A command line tool to interact with an EWMH/NetWM compatible X Window Manager. Get information, resize, move, etc.
A good tool for what it does.
Abandoned - Not updated
- As of 2020-12-30 Last updated 2005-10-10 (1.08)
- 2010-04-13 - 1.07 on Unity Linux 64bit-beta2
- 2010-02-03 - 1.07 on Unity Linux 64bit-beta2
2007-07-21 - 1.07 on (distribution not recorded)
The wmctrl program is a UNIX/Linux command line tool to interact with an EWMH/NetWM compatible X Window Manager.
The tool provides command line access to almost all the features defined in the EWMH specification. It can be used, for example, to obtain information about the window manager, to get a detailed list of desktops and managed windows, to switch and resize desktops, to make windows full-screen, always-above or sticky, and to activate, close, move, resize, maximize and minimize them.
The command line access to these window management functions makes it easy to automate and execute them from any application that is able to run a command in response to an event.
Tips and Tricks ∞
Based on PID, find and work with the long name ∞
Is there a way to create a shortkey to take the active window to the next desktop (as in Sawfish)? ∞
- Answer 1: The best solution would be to use a keygrabber (such as bbkeys) and make use if it's specific features. The issue has been addressed in the bbkeys feature request #740764 and proposed patches #1189443 and #1189457. [ 1 ] FIXME: As of the time of this writing, the new functionality has been accepted into bbkeys and will be part of version 1.0.0, whenever that comes out. In the meantime, you can check out a current copy from CVS (was http://sourceforge.net/cvs/?group_id=33459).
Answer 2: Here's a workaround, which uses the
wmctrltool and a shell script to achieve the desired result. It is rather strange and slow, and besides you would still need to bind the script to a key, and you end up with the same answer: this kind of support is better suited for being built-in inside the keygrabber. But it's an interesting script so here it goes, a script that moves the currently active window to the next desktop:
2010-04-13 - 1.07 ∞
make, it gives:
main.c:36:29: error: X11/Xmu/WinUtil.h: No such file or directory
smart install lib64xmu-devel
2010-02-03 - 1.07 ∞
./configure works well,
make gives an error:
2007-07-21 - 1.07 ∞
It took me a long time, but I did end up coming back to figure wmctrl out. See my wmctrl user documentation[doesn't exist].
- It's not possible to minimize a window!
I also have no idea how to learn the status of a window.
Similar tools / alternatives ∞
- Devil's Pie
- xdpyinfo, xprop, xlsclients, xlsatoms and xwininfo.
autoproperties support from the window manager itself.
Please contact me if you find any other interesting tools.