wmctrl is a command for EWMH- and NetWM-compatible X Window managers on Linux systems. It can be used to control windows by their characteristics on workspaces and on external displays.
Questions tagged [wmctrl]
55 questions
15
votes
1 answer
How to customize window tiling zones/grid?
In Cinnamon, pressing super+arrow keys (or other similar shortcut) resizes current window into a tile (snaps to grid). How can I customize this grid?
For example I would like to split screen into 3 equal vertical zones so that the window would…
Jan Warchoł
- 2,881
- 3
- 16
- 28
10
votes
2 answers
How do I resize the active window to 50% with wmctrl?
I would like to resize the window to the left half of the screen.
A solution to achieve that would be to use wmctrl and keybind the right command to a keyboard shortcut.
But the manpage only shows how to resize to a certain height and width, for…
rubo77
- 27,777
- 43
- 130
- 199
9
votes
2 answers
wmctrl-like tool or alternative for kde wayland
A big part of my workflow is based on using shortcuts. Currently I use xbindkeys and wmctrl to run-or-raise an application. E.g: Super+F brings up firefox or run it if not running.
Autokey works fine with KDE and I could also use KDE native custom…
academo
- 141
- 1
- 6
9
votes
1 answer
wmctrl doesn't move window when snapped or tiled
I'm using Mint 18.1 cinnamon. I'm trying to write a little bash program to move windows around.
I have a command that will remove maximized_vert and maximized_horz then move the window. It works fine if the the target window is maximized or just…
Raif
- 191
- 2
8
votes
3 answers
How can I automate window tiling with a custom width? (Cinnamon)
I am running Linux Mint 17 Cinnamon 2.4.8.
I really like xdotool, but it conflicts with Cinnamon's awesome snapping/tiling feature.
If I run the following command, it does NOT work if the current window is snapped to a…
TuxForLife
- 2,789
- 1
- 13
- 19
7
votes
1 answer
Resizing a maximized window from the command line
The following script fails to resize an already maximized window:
wmctrl -i -r :ACTIVE: -b remove,maximized_vert,maximized_horz
xdotool windowunmap --sync
xdotool windowmap --sync
wmctrl -r :ACTIVE: -e 0,300,168,740,470
I am pretty sure the…
George
- 1,799
- 2
- 25
- 30
5
votes
3 answers
How to get the url from current tab of firefox, without need to install additional software?
It's possible to get the current tab with xdotool:
# set focus to address on browser
xdotool search --onlyvisible --classname Navigator windowactivate --sync key F6
# copy address from browser tab to clipboard
xdotool search --onlyvisible…
Alfred.37
- 110
- 1
- 19
5
votes
2 answers
How to minimize an application window from command line
I have a startup application that has no option to "start minimized" or "close to system tray" etc. and therefore would like to use a startup script that will first start the application and then minimize its window.
Actually, I already have a…
Sadi
- 441
- 6
- 19
5
votes
1 answer
Command-line tool to get "click and drag" rectangle coordinates from the screen
I would like to execute a command-line command that activates "click and drag" mouse selection on a single local X11 screen.
The goal is to:
get the selected rectangle X and Y coordinates,
get the rectangle width and height,
output these values to…
user218169
5
votes
2 answers
Retrieve X11 window ID of a just-launched GUI-program
I want to retrieve the X id of GUI programs I launch in background, in order to work on their windows properties. I've been so far using this workaround:
myprogram &
sleep 1
winID=$(wmctrl -l | awk '/./{line=$0} END{print $1;}')
But this relies on…
iago-lito
- 2,581
- 4
- 20
- 35
5
votes
1 answer
How to move a window to a different workspace using its ID, in bash?
Currently I have successfully used wmctrl -r :SELECT: -t 2 but something like wmctrl -r -i 0x03e00003 -t 2 does not work. How should I write the command in order to select the window to be moved by ID not by mouse?
I am using Linux Mint 13 with…
tardem
- 53
- 1
- 4
4
votes
1 answer
Is there a way to get list of windows on KDE Wayland?
In the era of X11, I could do wmctrl -l to list available windows, that I can use in my scripts.
$ wmctrl -l
0x01000050 0 my-pc project1 – Readme.md
But nowadays most application use Wayland. The above command only shows windows that are running…
Ashark
- 767
- 7
- 24
4
votes
1 answer
How can I monitor in real time the changes to the browser's WM_NAME
I need to check how the browser's WM_NAME (let's say google-chrome) is changing in real time.
How can I do that ?
Michal Przybylowicz
- 431
- 3
- 10
3
votes
3 answers
AWK - Dealing with spaces in the last column of output from wmctrl
As a first project for learning awk, I wanted to reformat the output of the wmctrl command, which can be installed like this in Debian 11:
sudo apt install wmctrl
To list information about all the windows I have open, I run this command:
wmctrl…
Lonnie Best
- 4,895
- 6
- 27
- 42
3
votes
1 answer
Is it possible to move window out of the screen border?
So I'm currently moving application Windows with wmctrl but I can't move a window outside the screen's border. Not talking about moving outside top left corner which we can't even acheive it by mouse, I can't even move most of the window outside the…
Andrew.Wolphoe
- 325
- 1
- 7
- 19