This extension provides dbus method to focus app window on GNOME Shell by their WM_CLASS
property (similar like wmctrl -xa
).
git clone git://github.com/ramottamado/gnome-shell-focus-wmclass.git
cd gnome-shell-focus-wmclass
make install
gdbus call \
--session \
--dest org.gnome.Shell \
--object-path /org/gnome/Shell/Window \
--method org.gnome.Shell.Window.FocusWMClass "Spotify"