Subject: Re: FVWM: FWD: Re: [TAG] determining screen resolution

From: Elliot Sowadsky <[email-masked]>
Date: Mon, 8 Oct 2001 19:11:56 -0700 (PDT)

> Is there a way to mathmatically modify these values from within .fvwm2rc?
> If I
> use $[vp.width], the bar extends app 12p beyond the viewing range of my
> screen. I tried
>
> *MyBar2Geometry $[vp.width]-12x115+0-0
> and
> *MyBar2Geometry $[vp.width-12]x115+0-0

This works for me.

+	I Resize br w-10p w-27p  # account for borders and title

So maybe you can use window arithmetic...

create a window of size $[vp.width]
resize the window by 12
pass that new w as a param back to your MyBar2Geometry

ok, so i'm being silly
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Glen Lee Edwards <[email-masked]>
Date: Mon, 8 Oct 2001 23:30:20 -0500 (CDT)

Dan,

The line works.  However, on experimenting with it after using Ctrl-Alt-KP_Plus,
the variables $[vp.width] and $[vp.height] aren't changing to be current with
the new window size.  No matter what screen resolution I was at, the values
always showed 1152 and 864 respectively.

I have my screen resolution settings in /etc/X11/XF86Config reading:

	Modes		"1152x864" "1024x768" "800x600"

I experimented with it by changing the line to :

	Modes		"1024x768" "1152x864" "800x600"

so when I started X it would start out at 1024x768. But $[vp.width] and
$[vp.height]  still read as 1152 and 864.  The only way I could get them to read
the correct value was to change the "Modes" line to:

	Modes		"1024x768"

When it only had one value, $[vp.width] and $[vp.height] read the current window
settings.  When I have multiple values in for it the largest settings are used,
regardless of what the actual values are.

The draw back to this is that I have to modify XF86Config every time I want to
change screen resolutions.  The good part is that I don't have to reset the
values in .fvwm2rc.

Is there another way to read current screen size settings through Piperead?  I'm
not a computer expert.  I don't know what system wide variables might hold the
current screen parameters.

Glen

Dan Espen writes:
 > Glen Lee Edwards <[email-masked]> writes:
 > > but neither worked, instead moving the bar to the top of the screen (it's
 > > supposed to be on the bottom).
 > 
 > Use PipeRead to do arithmetic:
 > 
 > PipeRead 'echo "*MyBar2Geometry `expr $[vp.width] - 12`x115+0-0"'
 > 
 > (Warning, lightly tested.)
 > 
 > -- 
 > Dan Espen
 > 444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
 > Piscataway, NJ 08854                     Phone: (732) 699-5570
 > --