[openbox] Using screen size in key bindings

John Eikenberry jae at zhar.net
Wed Mar 11 20:58:15 EDT 2009


openbox at jelmail.com wrote:

> Hello,
> I've just signed up to Openbox and like it so far. I have written some key
> bindings to relocate windows in a similar fashion to the windows programs
> "SplitView" and "Winsplit Revolution". 
> 
> For example I press W+Home and the active window is moved and resized so it
> occupies the top left quadrant of the screen.
> 
> I have done this by hard coding the window size based on the dimensions of
> my screen. I have a 1920x1200 display so my key binding resizes the window
> to a width of 960 and a height of 600.
> 
> Now, what I would like to do is somehow tell openbox to use screenwidth/2
> and screenheight/2 so moving to a different screen or resolution would not
> require the keybindings to be changed.

This is almost possible from a shell script. The only piece of the puzzle
missing is a way to get the window id of the currently focused window.
Anyone know of a way?

-- 

John Eikenberry
[jae at zhar.net - http://zhar.net]
[PGP public key @ http://zhar.net/jae_at_zhar_net.gpg]
______________________________________________________________
"Perfection is attained, not when no more can be added, but when no more 
 can be removed." -- Antoine de Saint-Exupery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://icculus.org/pipermail/openbox/attachments/20090311/a3791545/attachment.pgp>


More information about the openbox mailing list