9

The output of wmctrl -lx looks like this:

0x020002f5  0 Plasma.Plasma         lnx plasma-desktop
0x02a00015  0 okular.Okular         lnx TCP/IP Protocol Suite – Okular
0x032000fe  1 amarok.Amarok         lnx Billy Talent - This Suffering  ::  Amarok
0x03e00001  0 Google-chrome.Google-chrome  lnx wmctrl based on class - Google Search - Google Chrome
0x04400001  1 Chromium.Chromium     lnx openSUSE - Chromium
0x05400050  0 gvim.Gvim             lnx activate_or_run.sh (~/bin/repo) - GVIM
0x04a0001a  0 konsole.Konsole       lnx user@lnx:/home – Konsole

I would imagine that 2nd column denotes class of window.

Now I would like to activate the window based on its class rather than its title. Let's say the chosen window is gvim.Gvim.

So I tried wmctrl -ax gvim.Gvim or different combinations, surrounding gvim.Gvim in quotation marks, using only gvim then Gvim but to no success.

How can this be done?

1
  • Actually @Arkonix was in the correct track. This works just like the answer: wmctrl -xa gvim.Gvim Sep 14, 2018 at 14:45

1 Answer 1

14

Since <WIN> is a parameter of the -a option you should run the command as:

wmctrl -x -a gvim.Gvim

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .