Forrest logo
back to the wmctrl tool

wmctrl:tldr:9116f

wmctrl: Select a window and toggle fullscreen.
$ wmctrl -r ${window_title} -b toggle,fullscreen
try on your machine

The command wmctrl -r ${window_title} -b toggle,fullscreen is used to toggle the fullscreen mode of a specified window using the wmctrl utility.

Explanation:

  • wmctrl: It is a command-line utility in Linux that lets you interact with the window manager of your desktop environment.
  • -r ${window_title}: This option specifies the window to be targeted for the operation. ${window_title} should be replaced with the actual title or part of the title of the window.
  • -b toggle,fullscreen: This option specifies the action to be performed on the window. In this case, the action is toggle,fullscreen, which means it will toggle the fullscreen state of the window. If the window is currently in fullscreen mode, it will be restored to its previous size and position. If the window is not in fullscreen mode, it will be maximized to occupy the entire screen.

Overall, this command allows you to easily toggle the fullscreen mode of a specified window using the wmctrl utility.

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