2012/9/3 Amy <mathematical.cof...@gmail.com> > > The above signal fires whenever a workspace is switched, be it via the > overview, keybinding, etc. > > If you only want your function to fire when the overview is open you > check whether the overview is visible with `Main.overview.visible`. > > global.screen.connect('workspace-switched', function () { > if (Main.overview.visible) { > // your function > } > }); >
Thanks! (Also @ Jasper St Pierre for correcting the place where to put the connect) But in fact, now I found out calling the function every time the workspace switches is even more useful... :-) Is there a way how to find out which connect events are available? I searched /usr/share/gnome-shell/* for a file including "workspace-switched", but found nothing. Entering global.screen.connect in looking glass didn't help either, and unfortunately, I wasn't successful in finding the source code for global.screen (that's what I tried as a beginner.) (Specific I would be interested in the events: * show overview * close a window through the hover x-Button in the overview)
_______________________________________________ gnome-shell-list mailing list gnome-shell-list@gnome.org https://mail.gnome.org/mailman/listinfo/gnome-shell-list