Forrest logo
back to the wmctrl tool

wmctrl:tldr:99acd

wmctrl: Switch to a workspace.
$ wmctrl -s ${workspace_number}
try on your machine

The command "wmctrl -s ${workspace_number}" is used to switch to a specific workspace in a window manager. Here's a breakdown of the command:

  • "wmctrl" stands for "Window Manager Control" and is a command-line tool for controlling window managers. It can be used to query and manipulate windows and workspaces.
  • "-s" is an option that tells wmctrl to switch to a specific workspace.
  • "${workspace_number}" is a placeholder for the number of the workspace you want to switch to. You need to replace it with the actual number of the workspace you want to switch to.

For example, if you want to switch to workspace number 2, you would use the command "wmctrl -s 2". This command will instruct the window manager to switch to workspace 2, and the windows associated with that workspace will become visible on the screen.

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.
back to the wmctrl tool