jml / undistract-me

Notifies you when long-running terminal commands complete
Other
540 stars 48 forks source link

Could FocusIn/FocusOut mode be used? #72

Open ypid opened 2 years ago

ypid commented 2 years ago

I just stumbled over https://unix.stackexchange.com/questions/480052/how-do-i-detect-whether-my-terminal-has-focus-in-the-gui-from-a-shell-script

Sounds too good to be true. If this could be used, it would be one generic solution and no specific code for Tmux would be needed anymore. It could also solve Terminal emulators with multiple tabs and SSH. I am currently not motivated enough to test all this, mainly because on Qubes OS, the xprop -root _NET_ACTIVE_WINDOW does not work in VMs. When that is fixed/understood, I can return to this.

Cross post from: https://github.com/Nanoseb/notifyosd.zsh/issues/4