[openbox] Question about the dock and windows placement

Miguel Bazdresch ob-01 at thewizardstower.org
Mon May 10 15:27:42 EDT 2004


* Miguel Bazdresch <ob-01 at thewizardstower.org> [2004-05-06 23:37]:
> I want to do what might be an uncommon thing: I want one of my desktops
> to have a real fullscreen xterm, meaning covering the dock.

The other day I finally discovered the "floating" property of the dock
while playing with obconf. So now I can put stuff in the space that
belongs to the dock.

The problem now, of course, is that all apps maximize over the dock. I
started to study the sources planning to add an action code-named
"MaximizeButNotOverDock" but it will take time. The code is very clean
but far from trivial.

(In my view the best solution would be to add a parameter to all
move/resize operations to control whether they stop at the dock or at
the physical screen edge).

So, to get me along in the meantime I did a shellscript that does the
same thing. It's UGLY and it doesn't "toggle" or "restore" the window.
The dock is hard-coded to be at the left and 66 bits wide. But it does
what I need for now. Here it is in case somebody finds it useful.

#!/bin/bash

# This script maximizes the current focused
# window without covering the dock

ID=`xdpyinfo | grep focus | cut -d ' ' -f 4 - | cut -d ',' -f 1`

xdpyinfo | grep focus | grep Parent &> /dev/null && ID=$((ID-1))
wmctrl -i -r $ID -b add,undecorated # My personal preference
wmctrl -i -r $ID -e 0,69,0,955,768

-- 
Miguel Bazdresch
http://thewizardstower.org/



More information about the openbox mailing list