how to script the window manager?
xfce at tstotts.net
xfce at tstotts.net
Thu Jul 20 08:11:14 CEST 2006
Brian J. Tarricone wrote:
> If you just want a ready-made tool, wmctrl or devilspie should be
> sufficient (and should work with any EWMH-compliant WM).
Have both installed. Devil's Pie is a challenge w/o adequate
documentation; will have to get around to that one. I'd like to avoid
writing C to use libwnck for should be a simple scripting job (though
I could if necessary).
Basically, I want to minimize all windows of an application class, say
APPX, via a keyboard shortcut. I know how to parse wmctrl's listing
to obtain window IDs or classes for exactly the windows I want to
operate on.
Example:
#!/bin/bash
W=`wmctrl -xl | awk '/0x.* \w+.appx .*/ {print $1}'`
for win in $W; do
wmctrl -i -r $win SOMETHING_HERE
done
However, I cannot find a way to minimize a window. What attributes
would I add/remove/toggle to accomplish this. I know that adding or
toggling 'hidden' alone is generally ignored by EWMH WMs as it is an
internal attribute, and not an operation, like 'minimize'.
How does xfwm4 perform a minimization (hide/iconify a window), and how
can I reproduce it on demand from a script?
Any recommendations / examples are greatly appreciated.
Regards,
timotheus
More information about the Xfce
mailing list