FVWM: RE: fvwmrc_convert

From: Lionel Cons <cons_at_mail.cern.ch>
Date: Wed, 4 Dec 1996 18:16:21 +0100

Grant McDorman writes:
>
> I do have a more recent version; however, the only change is the addition
> of handling for ClickToFocus. Other than that, it is [functionally] identical
> to the current version. [...]
> Other than that, I can't suggest anything. If you're familiar with awk,
> you can try to extend the script. What features do you think are needed?

Here is what we did. We will have a closer look at the new script from
2.0.44 soon...

We modified fvwmrc_convert for easy things that we've found. You'll
find the diff under my signature.

Because we are not awk experts, we made a Perl front-end that
understands the things that we've found in our fvwmrc files and that
are not handled by fvwmrc_convert, namely:
 - ignore the case for popups (we had PopUp, Endpopup...)
 - handle submenus that are not indented:
Popup "SystemMenu"
Title "System Menu"
Exec "New Window" exec xterm &
Popup "Standard Tools" StdTools
[...]
EndPopup
 - handle menu names with spaces inside

Of course we would like very much to have a single script that can
handle all these...

___________________________________________________
Lionel Cons http://wwwcn.cern.ch/~cons
CERN http://www.cern.ch

*** fvwmrc_convert-2.0.43 Fri Nov 29 11:22:50 1996
--- fvwmrc_convert Fri Nov 29 10:59:33 1996
***************
*** 25,32 ****
  # 24 May 95
  
  echo "fvwmrc-to-2 1.7a"
! if [ ! -x /usr/local/contrib/bin/gnu/gawk ];then
! echo "gawk (/usr/local/contrib/bin/gnu/gawk) missing, cannot run"
     exit 1
  fi
  source=${1:-$HOME/.fvwmrc}
--- 25,32 ----
  # 24 May 95
  
  echo "fvwmrc-to-2 1.7a"
! if [ ! -x /usr/local/bin/gawk ];then
! echo "gawk (/usr/local/bin/gawk) missing, cannot run"
     exit 1
  fi
  source=${1:-$HOME/.fvwmrc}
***************
*** 246,252 ****
          }
  /^StdBackColor[ ]/ {
              dflt["stdbackcolor"]=stdbackcolor=$2;
! printf ("#!%s (new command=Style \"*\" Color f/b)\n)\n", $0);
              print "Style \"*\" BackColor " $2;
              next;
          }
--- 246,252 ----
          }
  /^StdBackColor[ ]/ {
              dflt["stdbackcolor"]=stdbackcolor=$2;
! printf ("#!%s (new command=Style \"*\" Color f/b)\n", $0);
              print "Style \"*\" BackColor " $2;
              next;
          }
***************
*** 257,279 ****
  /^MWMFunctionHints$/ { printf ("Style \"*\" MWMFunctions\n"); next; }
  /^MWMDecor$/ { printf ("Style \"*\" MWMDecor\n"); next; }
  /^MWMDecorHints$/ { printf ("Style \"*\" MWMDecor\n"); next; }
! /^MWMBorder$/ { printf ("Style \"*\" MWMBorder\n"); next; }
  /^MWMButtons$/ { printf ("Style \"*\" MWMButtons\n"); next; }
  /^MWMHintOverride$/ { printf ("Style \"*\" HintOverride\n"); next; }
  /^RandomPlacement$/ { print "Style \"*\" " $0; next; }
  /^SmartPlacement$/ { print "Style \"*\" " $0; next; }
! /^BorderWidth$/ { print "Style \"*\" " $0; next; }
! /^HandleWidth$/ { print "Style \"*\" " $0; next; }
  /^NoPPosition$/ { print "Style \"*\" " $0; next; }
  /^DecorateTransients$/ { print "Style \"*\" DecorateTransient"; next; }
  /^SuppressIcons$/ { print "Style \"*\" NoIcon"; next; }
  /^StickyIcons$/ { print "Style \"*\" StickyIcon"; next; }
  
  /^AutoRaise[ ]/ { print "#! " $0 " (use Module FvwmAuto)";
                            print "AddToFunc \"InitFunction\" \"I\" Module FvwmAuto " $2;
                            next;
                          }
! /^ModulePath[ ]/ { print "ModulePath /isg/proj/x11/contrib/clients/fvwm2"; next; }
  /^PixmapPath[ ]/ { print $0; next; }
  /^IconPath[ ]/ { print $0; next; }
  /^Style[ ]/ { print $0; next; }
--- 257,281 ----
  /^MWMFunctionHints$/ { printf ("Style \"*\" MWMFunctions\n"); next; }
  /^MWMDecor$/ { printf ("Style \"*\" MWMDecor\n"); next; }
  /^MWMDecorHints$/ { printf ("Style \"*\" MWMDecor\n"); next; }
! /^MWMBorders$/ { printf ("Style \"*\" MWMBorder\n"); next; }
  /^MWMButtons$/ { printf ("Style \"*\" MWMButtons\n"); next; }
  /^MWMHintOverride$/ { printf ("Style \"*\" HintOverride\n"); next; }
  /^RandomPlacement$/ { print "Style \"*\" " $0; next; }
  /^SmartPlacement$/ { print "Style \"*\" " $0; next; }
! /^BoundaryWidth[ ]/ { print "Style \"*\" " $0 $2; next; }
! /^HandleWidth[ ]/ { print "Style \"*\" " $0 $2; next; }
  /^NoPPosition$/ { print "Style \"*\" " $0; next; }
  /^DecorateTransients$/ { print "Style \"*\" DecorateTransient"; next; }
  /^SuppressIcons$/ { print "Style \"*\" NoIcon"; next; }
  /^StickyIcons$/ { print "Style \"*\" StickyIcon"; next; }
+ /^SloppyFocus/ { print "Style \"*\" " $0; next; }
+ /^ClickToFocus/ { print "Style \"*\" " $0; next; }
  
  /^AutoRaise[ ]/ { print "#! " $0 " (use Module FvwmAuto)";
                            print "AddToFunc \"InitFunction\" \"I\" Module FvwmAuto " $2;
                            next;
                          }
! /^ModulePath[ ]/ { print "ModulePath /usr/local/lib/X11/fvwm2"; next; }
  /^PixmapPath[ ]/ { print $0; next; }
  /^IconPath[ ]/ { print $0; next; }
  /^Style[ ]/ { print $0; next; }
***************
*** 302,309 ****
  /^EdgeResistance[ ]/ { print $0; next; }
  /^DeskTopSize[ ]/ { print $0; next; }
  /^DeskTopScale/ {
! print "#! " $0;
! print "Warning: " $1 " not in Fvwm2, command dropped">"/dev/stderr";
          next;
   }
  /^WindowListSkip[ ]/ { print "#! $0 [deleted]";
--- 304,311 ----
  /^EdgeResistance[ ]/ { print $0; next; }
  /^DeskTopSize[ ]/ { print $0; next; }
  /^DeskTopScale/ {
! printf ("#!%s (using module FvwmPager)\n", $0);
! print "*FvwmPagerDesktopSize " $2;
          next;
   }
  /^WindowListSkip[ ]/ { print "#! $0 [deleted]";
***************
*** 318,323 ****
--- 320,333 ----
                  if (warned[$1]==FALSE)
                  {
                  print "Warning: " $1 " commented out, obsolete (use FvwmPager)" >"/dev/stderr";
+ warned[$1] = TRUE;
+ }
+ next;
+ }
+ /^Cursor[ ]/ { print "#! $0 [deleted]";
+ if (warned[$1]==FALSE)
+ {
+ print "Warning: " $1 " commented out, obsolete" >"/dev/stderr";
                  warned[$1] = TRUE;
                  }
                  next;
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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 Wed Dec 04 1996 - 11:19:20 GMT

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