HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

wmctrl — CLI for X Window Manager. More information: <https://manned.org/wmctrl>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandwmctrlclimoreformanagerwindow
linux

Problem

How to use the wmctrl command: CLI for X Window Manager. More information: <https://manned.org/wmctrl>.

Solution

wmctrl — CLI for X Window Manager. More information: <https://manned.org/wmctrl>.

List all windows, managed by the window manager:
wmctrl -l


Switch to the first window whose (partial) title matches:
wmctrl -a {{window_title}}


Move a window to the current workspace, raise it and give it focus:
wmctrl -R {{window_title}}


Switch to a workspace:
wmctrl -s {{workspace_number}}


Select a window and toggle fullscreen:
wmctrl -r {{window_title}} -b toggle,fullscreen


Select a window and move it to a workspace:
wmctrl -r {{window_title}} -t {{workspace_number}}

Code Snippets

List all windows, managed by the window manager

wmctrl -l

Switch to the first window whose (partial) title matches

wmctrl -a {{window_title}}

Move a window to the current workspace, raise it and give it focus

wmctrl -R {{window_title}}

Switch to a workspace

wmctrl -s {{workspace_number}}

Select a window and toggle fullscreen

wmctrl -r {{window_title}} -b toggle,fullscreen

Context

tldr-pages: linux/wmctrl

Revisions (0)

No revisions yet.