4

I wish a method (i.e. a window manager or an addon), which allows me to search for a window by title inside a list of opened windows, to switch to that window directly, instead of desperately seeking for that particular window in the taskbar.

Maybe, there is also a command for window switching? (switch to a window with a title that matches the given pattern).

I am sure there must be a window list command, although I have not researched one yet.

1 Answer 1

5

Window List command (wmctrl):

$ wmctrl -lx
0x0540043e  0 google-chrome.Google-chrome  ubunzeus Search for window title? - Ask Ubuntu - Google Chrome
0x050000ec  0 Mail.Thunderbird      ubunzeus Inbox - Mozilla Thunderbird
0x04e1068d  0 gnome-terminal-server.Gnome-terminal  ubunzeus ljames@ubunzeus: ~

Command to switch to specific window (xdotool)

$ xdotool windowactivate 0x0540043e

The above command will switch to the Windows with the ID 0x0540043e, which is specific from the list for this Askubuntu message entry.

They are both in the repository:

$ sudo apt install wmctrl xdotool

The command argument for wmtrl above is:

  • -l List the windows
  • -x Include the WM_CLASSS of the window.

The command argument for the xdotool is:

  • windowactivate Bring to front the window specificed
  • Window ID The specificed window to be acted upon.

You must log in to answer this question.

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