Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
OP are you still looking for an answer? If so, you may need to repost your question as this is marked for closure. Regards, –  Ringtail Apr 12 '12 at 17:47
    
yep, i'm still looking for an answer. The gnome-shell extensions I've looked at seem to have quite a steep learning curve... –  hwjp Apr 15 '12 at 9:46
add comment

closed as too localized by Luis Alvarado Mar 14 '13 at 16:10

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.