[TriLUG] Re: Sawfish, Enlightenment.. any RH 7.1 WM

Karl J. Runge runge at karlrunge.com
Mon Nov 5 11:24:55 EST 2001


On Mon, 05 Nov 2001, Rodent of Unusual Size <Ken.Coar at golux.com> wrote:
> 
> Thanks!  Something persistent and generic would be great;
> at this point, I'll take any stort in a prom, and that
> sounds like a good one.
>
> Okey, I'm askin'.  The thing that stumps me [most] is
> making/keeping the association with the different
> desktops/viewports.

Ah, you replied!  You've called my bluff, now let's see if I help you out.


One simple model is to assume the windowmanager "does the right thing"
when given an XY geometry position that is outside the screen width
or height: i.e. it will plop it over into the desired "view port".

E.g. suppose your screen res is 1280x1024.  Does a command like:

	rxvt -geometry +1300+1100

plop the rxvt over one horizontal viewprot and down one verticle viewport?

This works for tvtwm, cvwm, olvwm, fvwm, and enlightenment.
Does it work on sawfish?  I don't know; I don't have it installed.
I would HOPE something like this would persist, but one cannot count
on it absolutely.

So suppose you made the following script and called it "rxvt.launch"
and your ~/.xinitrc (or whatever) calls "rxvt.launch &" (say near the
bottom):

-------------------------------------------------------------------------
  #!/bin/sh -- # A comment mentioning perl
eval 'exec perl -S $0 ${1+"$@"}'
        if 0;

$LX = 1280;
$LY = 1024;

# try to adjust to local display screen size:
if ( `xdpyinfo` =~ /dimensions.*\s(\d+)x(\d+)\s.*pixels/ ) {
	$LX = $1;
	$LY = $2;
} 

$yshift = int(0.35 * $LY);	# Y shift downward in each room.

$cmd = "-e sh -c 'date; sleep 10; tput bel'"; # for testing, they beep and exit.
#$cmd = ""; # for real 

# place windows in the various virtual rooms:
foreach $nx (0, 1) {
    foreach $ny (0, 1) {
	foreach $m (0, 1, 2) {
		$x = $nx * $LX;
		$y = $ny * $LY + $m * $yshift;
		system("rxvt -title 'I_AM:$nx,$ny,$m' -geometry 80x25+$x+$y $cmd &");
	}
    }
}
-------------------------------------------------------------------------

Then this will start up 12 (!) rxvt's: 3 in each viewport (aligned
vertically and flush left) in each of viewports 0,0 0,1 1,0 and 1,1.

I hope this is close to what you want.  Instead of code you can just
hardwire in 12 "rxvt -geometry ... &" calls in ~/.xinitrc if you want. 


To go onto other "virtual desktops", there is a mechanism in fvwm where
you can say something like:

	xterm -xrm "*Desk:2" -geometry +1300+1100

and that will put it in viewport 1,1 on the 3rd virtual desktop.

I do not know if any other window managers besides fvwm supports the
"Desk:N" X resource hint.  Also, some apps barf on the "-xrm" (X
resource manager) cmd line option. Your rxvt for example :-(


HTH

Karl




More information about the TriLUG mailing list