Re: FVWM: restricting oversize windows

From: Dan Espen <dane_at_mk.telcordia.com>
Date: Fri, 03 Jan 2003 16:10:39 -0500

Perry Hutchison <phutchis_at_beaverton.windriver.com> writes:
> Is it possible to configure 2.2.4 to restrict windows to the size of
> the screen, even if -geometry requests larger?

I don't think so.

> Motivation: I want an xterm just tall enough to display an entire
> file, but no taller than the screen. This:

For that, I like to use a keybinding:

Key F1 A M Maximize 0 100

> xterm -geometry "80x`wc -l < $f | tr -d ' '`" +sb -sl 0 -e less $f
>
> gets the file length almost right -- it's off by one line because it
> doesn't allow for the "less" command/status line at the bottom -- but
> if the file is longer than 89 lines the window doesn't fit on the
> screen. I could write a more complicated script, except that there's
> no immediately-obvious way for a script to determine the maximum line
> count for whatever display it might happen to be running on.

In 2.4.x fvwm sets $[vp.height] which you could use in PipeRead.

If, for some reason, you don't want to upgrade you can pull the
screen height out of xdpyinfo.

That would give you screen height in pixels, but theres still no
way that I know of to know the height of your font in pixels.
I guess you'd have to hard code that.

-- 
Dan Espen                           E-mail: dane_at_mk.telcordia.com
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Jan 03 2003 - 15:13:36 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST