Quite a few terminal emulators do this already. Including the one I maintain.