> > Is it possible to configure 2.2.4 to restrict windows to the size of
> > the screen, even if -geometry requests larger?
> > 
> > Motivation:  I want an xterm just tall enough to display an entire
> > file, but no taller than the screen ...
...
> Use "xwininfo -root" to get the screen size, then substruct decorations
> (border size, title height), then substruct xterm's scroll bar, then
> divide by the font used in xterm (7x14), you should get the needed
> geometry for xterm.
>
> Or just do the right thing and run the latest stable 2.4.14, then do:
>
>   Style XTerm MaxWindowSize $[vp.width]p $[vp.height]p

That is the sort of capability I had in mind.

For the sake of the archives, this is what I've ended up with for 2.2.4
using xwininfo.  (My xterm seems to be using a 13-pixel font.)

  #!/usr/local/bin/bash
  maxl=`(xwininfo -root | sed -n -e 's/  Height: //p' ; echo 35 - 13 / p) | dc`
  xterm -geometry \
      "80x`(wc -l < $1 ; echo \"1 + d [$maxl p q] sa $maxl <a p q\") | dc`" \
      +sb -sl 0 -title $1 -n `basename $1` -e less $* &
--
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 PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to