[wplug] Restricting screen boundaries absolutely for apps in X?

Eric Cooper ecc at cmu.edu
Sun Apr 1 20:41:06 EDT 2007


On Fri, Mar 30, 2007 at 11:57:10PM -0400, Zach wrote:
> I want it to dynamically resize before opening to within
> 1024x768 (screen res) if it was going to open up with a dimension out
> of bounds and I want the x,y position of any dialog box to be within
> my 1024x768 bounding box.

Under Gnome, you might be able to use the "devilspie" utility.  It watches for
window creation events and uses a Lisp-like configuration language to
modify their geometry, etc.

For example, I like my terminal windows to be vertically maximized,
so I use this ~/.devilspie/gnome-terminal.gs file:

    (if (is (window_class) "Gnome-terminal")
	(maximize_vertically))

Not sure if it's powerful enough to move or clip an offscreen window,
but it might be a start.

BTW, the documentation with the package sucks, but you can google for
"devilspie tutorial" to find better docs.

-- 
Eric Cooper             e c c @ c m u . e d u


More information about the wplug mailing list