Forrest logo
back to the wmctrl tool

wmctrl:tldr:ea01b

wmctrl: Move a window to the current workspace, raise it and give it focus.
$ wmctrl -R ${window_title}
try on your machine

The command wmctrl -R ${window_title} is used to bring a specific window to the foreground or activate it. Here's the breakdown of the command:

  • wmctrl: This is a command-line tool for managing windows in X Window System.
  • -R: It is an option that specifies performing the action of raising a window to the foreground or activating it.
  • ${window_title}: This is a placeholder that represents the title or name of the window you want to bring to the foreground. You need to replace ${window_title} with the actual title or name of the desired window.

In summary, by running this command with the appropriate window title, you can bring a particular window to the front of the screen, making it the active window.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • set focus on an app?
back to the wmctrl tool