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.
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