run a script on window switch (on alt-tabbing into/outof a particular app)
- by hwjp
I'd like to run a script whenever I switch into or out of a window.
Specifically, I have a "toggle touchpad on/off" script, which i want to run whenever I switch into or out of gvim.
so, is there any kind of hook for that? even something that can be run whenever alt-tab is detected, as long as it can tell what window you're going from/to?
I'm using gnome-shell, if that makes any difference.
[edit] Have started looking into gnome-shell-extensions, which seem to be written in javascript, so might not be too hard to hack one together myself...