Re: FVWM: Doing stupid things

From: <mats_at_elekta.se>
Date: Fri, 3 Nov 1995 11:49:07 +0100

I'm normally starting up vuewm, but sometimes I want to switch to fvwm
on both screens. I'm doing it like this (excuse my poor style):

        #! /bin/csh
        # Kill all vuewm
        _at_ v = `ps -e | grep vuewm | wc -l`
        if ($v > 0) then
          ps -e | grep vuewm | awk '{print "kill -9 " $1}' | sh
  
          # restart fvwm2
          _at_ num = `grep dev /usr/lib/X11/X0screens | grep -v "#" | wc -l`
          set host = `uname -n`
          if ($num > 1) then
            _at_ num--
            while( $num > -1 )
              set disp = $host":0.$num"
              fvwm2 -d $disp -s -f "FvwmCpp -Cppprog /lib/cpp -Cppopt \
                -DSCREEN$num .fvwm2rc" >& /dev/null &
              _at_ num --
            end
          else
            fvwm2 -f "FvwmCpp -Cppprog /lib/cpp .fvwm2rc" >& /dev/null &
          endif
        endif

and formatting my .fvwm2rc in accordance with normal cpp rules:

        #ifdef SCREEN0
        /* these options go on screen 0 */
        *FvwmButtons emacs - Exec "" exec /usr/local/bin/emacs &
        #endif

        #ifdef SCREEN1
        /* these options is for screen 1 */
        *FvwmButtons xemacs - Exec "" exec /usr/local/bin/xemacs &
        #endif

        #if !defined(SCREEN0) && !defined(SCREEN1)
        /* these options are used on a single screen configuration */
        #endif

Best Regards,

Mats Nilsson

-- 
Mats Nilsson 		   Mailing address:	Visiting address:
ELEKTA INSTRUMENT AB	   P.O. Box 7593	Birger Jarlsgatan 53
Tel: +46-8-4025518	   S-103 93 Stockholm	Tel: +46-8-402 5400
Email: mats_at_elekta.se	   Sweden		Fax: +46-8-402 5500
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Fri Nov 03 1995 - 04:42:46 GMT

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