[openbox] Placeing windows...
Anthony Thyssen
A.Thyssen at griffith.edu.au
Fri Mar 2 01:40:23 EST 2012
On Fri, 2 Mar 2012 05:05:47 +0100
meino.cramer at gmx.de wrote:
| Hi,
|
| from a shell script I want to place the windows of certain
| applications in a specific size and position to a certain desktop,
| which is not necessarily the aktive one.
|
| How can I acchieve this?
|
There are quite a number of commands to 'control X windows'
xdotool -- it is in active devlopment - lots of options
also can generate xevents (mouse moves and key strokes
or wait for certain events than do something
(make a 'pull out window' from the edge for example)
wmctrl -- reasonable
xwit -- Quite good
wmiface -- A old KDE3-based window controller
Warning many windows can take a bit of time to appear.
I use a script called xwin_find to watch for a window to appear
then report its X Window ID, so it can be re-positions, or iconified.
For example...
( firefox -P default -geometry 820x1000+530+70 & ) &
if id=`xwin_find 60 ".* Mozilla Firefox"`; then
echo "Main firefox window found (id=$id)"
xwit -resize 1000 1000 -move 330 70 -iconify -id $id
else
echo "ERROR: Firefox Default window NOT FOUND!"
fi
The script uses "xwininfo" (standard X utility) and can be downloaded from
http://www.ict.griffith.edu.au/anthony/software/#xwin_find
There is also an application calls 'devilspie' which does similar but
works continuously waiting for new windows to action on, not just the
initial window.
As another example I used "xwit" to create a script that can 'jiggle' a
window to bring it to the users attention..
http://www.ict.griffith.edu.au/anthony/software/#jiggle_window
For more info on getting Window IDs (very useful things) see
http://www.ict.griffith.edu.au/anthony/info/X/WindowID.hints
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
--------------------------------------------------------------------------
"Now I've got the bead on you with MY disintegrating gun.
And when it disintegrates, it disintegrates. (pulls trigger)
Well, what you do know, it (the gun) disintegrated."
-- Daffy Duck -- Duck Dodgers in the 24th and a half century
--------------------------------------------------------------------------
Anthony's Castle http://www.ict.griffith.edu.au/anthony/
More information about the openbox
mailing list