run a script on window switch (on alt-tabbing into/outof a particular app)
Posted
by
hwjp
on Ask Ubuntu
See other posts from Ask Ubuntu
or by hwjp
Published on 2011-11-10T15:03:49Z
Indexed on
2012/04/10
5:43 UTC
Read the original article
Hit count: 297
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...
© Ask Ubuntu or respective owner