FVWM: Re: .fvwmrc files and multiheaded displays

From: Brand Hilton <bhilton_at_adc.com>
Date: Fri, 21 May 1999 14:15:44 -0500

Many thanks to Dan for putting me on the right path to solve my
problem. I thought I'd share what I ended up doing in case someone
else might benefit from it.

The key problem is that I need to do different things based on the
value of the DISPLAY environment variable. Dan suggested FvwmM4 and
FvwmCpp. Either of these would have worked great, if only FVWM passed
the value of DISPLAY down to them. Unfortunately, it doesn't.
(Consider this a request for feature, if you wish :-)

Dan also mentioned PipeRead, which turned out to be the best thing. I
just wrote a shell script that spits different things to standard
output based on the value of DISPLAY. Here it is, in case anyone's
interested:


  #!/bin/sh

  if [ "$DISPLAY" = ":0.1" ]
  then
    cat <<'EOT'
  AddToFunc InitFunction "I" Exec exec xconsole -geometry 800x100-1+0 -iconic &
  + "I" Exec exec xterm -geometry 100x50+71-1 -T $HOSTNAME -n $HOSTNAME &
  + "I" Exec exec xterm -geometry 80x50-1-1 -T $HOSTNAME -n $HOSTNAME &
  #+ "I" Exec exec netscape45 -install -geometry 1072x872+70+900 &
  EOT
  fi

  ###################### button-bar ################################

  cat <<'EOT'
  # Colors
  *FvwmButtonsFore Black
  *FvwmButtonsBack #908090

  # Font
  *FvwmButtonsFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*

  # Geometry - really likes to pick its own size, but giving a position is OK

  EOT

  if [ $DISPLAY = ':0.1' ]
  then
    echo "*FvwmButtonsGeometry +0-1\n\n"
  elif [ $DISPLAY = ':0.0' ]
  then
    echo "*FvwmButtonsGeometry -1-1\n\n"
  fi

  cat <<'EOT'
  # Layout: specify rows or columns, not both
  *FvwmButtonsColumns 1

  # Define the buttons to use.....

  *FvwmButtons(Icon xterm.xpm, Action 'Exec xterm -T $HOSTNAME -n $HOSTNAME')

  EOT

  if [ $DISPLAY = ':0.1' ]
  then
    cat <<'EOT'
  *FvwmButtons(Swallow(UseOld,NoRespawn) perfmeter1 `Exec exec $OPENWINHOME/bin/perfmeter -t load -g -S -V -Wn -s 2 -name perfmeter1 -bg '#908090'`)
  *FvwmButtons(Swallow(UseOld,NoRespawn) xbiff `Exec exec $OPENWINHOME/bin/xbiff -bg '#908090'`)
  *FvwmButtons(Icon LetterEnvelope.xpm, Action 'Exec xterm -geometry 80x50 -T mutt -n mutt -e mutt')
  EOT
  fi

  cat <<'EOT'
  *FvwmButtons - whatever Swallow "FvwmPager" Module FvwmPager 0 0
  EOT

What this does is, on my main monitor (:0.1), fvwm starts up two
xterms. The button bar is in the lower left corner and has five
buttons: xterm, xperfmon, xbiff, mutt, and pager. On the auxiliary
monitor (:0.0), the button bar is in the lower right corner and has
only two buttons: xterm and pager.

That's about it. Thanks again, Dan, for the help.

-- 
 _____ 
|///  |   Brand Hilton  bhilton_at_adc.com
|  ADC|   ADC Telecommunications
|_____|   Richardson, Texas
--
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 May 21 1999 - 14:16:50 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:02 BST