How to get the active window name in Javascript?

Hi everyone,

I’ve installed a quite useful extension that displays a cheat sheet (Shortcuts - GNOME Shell Extensions).

I’d like to modify it, so it displays a different cheat sheet according to the active window (e.g. a Firefox cheat sheet if I currently work on Firefox, a Nautilus cheat sheet if I currently use Nautilus, and so on).

It should be rather trivial to implement, but I am struggling to find the javascript method to retrieve the active window name. Does anybody know how to do that ?

It’s better to use the window tracker to identify applications than to try window matching yourself based on the window name. Something like this should work:


Great, perfect ! Thanks !


is a bit more convenient.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.