Subject: FVWM: RE: fvwmrc_convert

From: Grant McDorman <[email-masked]>
Date: Wed, 04 Dec 1996 10:15:16 -0500 (EST)

-----BEGIN PGP SIGNED MESSAGE-----

On 29-Nov-96 10:02:04 Lionel Cons wrote:
> > We have a lot of users to convert from fvwm1 to fvwm2. We checked your
> script that is part of fvwm 2.0.43 and we found some "lacks of
> feature".
> 
> Do you have a more recent version?

I apologize for not responding sooner; I have been rather busy here.

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.

Adding the line
 /^ClickToFocus$/      { print "Style \"*\" ClickToFocus"; next; }
to the script just after /^StickyIcons$/ will implement this change.

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?

Grant McDorman <[email-masked]>
ISG Technologies, Inc.  http://www.isgtec.com
Mississauga, Ontario, Canada

--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: "Charles Hines" <[email-masked]>
Date: Wed, 4 Dec 1996 10:36:34 -0500

>>>>> "GM" == Grant McDorman <[email-masked]> writes:

>> Do you have a more recent version?

GM> I apologize for not responding sooner; I have been rather busy here.

GM> I do have a more recent version; however, the only change is the
GM> addition of handling for ClickToFocus. Other than that, it is
GM> [functionally] identical to the current version.

GM> Adding the line
GM>  /^ClickToFocus$/      { print "Style \"*\" ClickToFocus"; next; }
GM> to the script just after /^StickyIcons$/ will implement this change.

GM> Other than that, I can't suggest anything. If you're familiar with awk,
GM> you can try to extend the script. What features do you think are needed?

Bill Oswald also made some enhancements, which will be in the version
distributed in 2.0.44.  I've included it below.

Chuck

--------------->8 'fvwmrc_convert' cut here 8<---------------
#!/bin/sh

# Some time ago, Martin Kraemer <[email-masked]> posted an
# incomplete script to convert fvwm-1 'rc' files to fvwm-2. I've just
# recently fixed and enhanced that script; it's complete (or nearly
# so) now. This should help if you choose to convert.
#
# I've also made a couple of other minor changes to make life easier
# for our users here: I changed the default initialization from "Read
# .fvwmrc" to "Read .fvwm2rc" (in fvwm/fvwmc), and I installed fvwm 2
# as "fvwm2". With these changes, users can easily convert at their
# leisure.
#
# Herewith the script. It's using GNU awk (gawk), but will run with
# any "new" awk (nawk on Suns (SunOS 4, Solaris), awk on most other
# systems). If you do not use gawk, it will be case-sensitive (the
# case of the fvwm commands must match those in the script
# exactly). With gawk, it'll be case-insensitive.

#
# Convert fvwm 1.x configuration file to 2.0
#
# Originally written by Martin Kraemer <[email-masked]>
# Corrected, extended, and modified by Grant McDorman <[email-masked]>
# 24 May 95
# Addtional corrections and extensions by Bill Oswald <[email-masked]>
# 8 Mar 96 thru 18 Jul 96
# Minor corrections to make it easier to customize by Charles Hines 08/01/96
#

echo "fvwmrc-to-fvwm2rc"

# Point this to your gawk/nawk/awk exec:
AWK=/usr/local/bin/gawk
#AWK=/bin/awk

if [ ! -x $AWK ];then
   echo "$AWK missing, cannot run"
   exit 1
fi
source=${1:-$HOME/.fvwmrc}
dest=${2:-$HOME/.fvwm2rc}
if [ "$dest" != "-" ] ;then
        echo "Output to $dest"
        if [ -f $dest ] ; then
          mv $dest $dest.bak
          echo "Saving existing $dest as $dest.bak"
        fi
        exec >$dest
fi
cat $source | $AWK '
BEGIN   {
        printf ("# Trying to compile an old .fvwrc to the  new fvwm-2.0 Format\n");
        TRUE=1; FALSE=0;

        IGNORECASE=TRUE;

        hiforecolor="";             dflt["hiforecolor"] = "black";
        hibackcolor="";             dflt["hibackcolor"] = "CadetBlue";
        hilightcolor = FALSE;

        stdforecolor="";            dflt["stdforecolor"] = "black";
        stdbackcolor="";            dflt["stdbackcolor"] = "grey70";

        menuforecolor="";           dflt["menuforecolor"] = "black";
        menubackcolor="";           dflt["menubackcolor"] = "grey70";
        menustipplecolor="";        dflt["menustipplecolor"] = "grey40";
        font="";                    dflt["font"] = "-adobe-helvetica-medium-r-*-*-18-*-*-*-*-*-iso8859-1";
        mwmmenus="";                dflt["mwmmenus"] = "fvwm";
        menustyle=FALSE;

        inpopup=FALSE;
        infunction=FALSE;
        prefix="";

        placement = FALSE;           dflt["placement"] = "ActivePlacement, DumbPlacement"
}

/^[ \t]*#/                      {   # Comment, pass it thru
        print $0;
        next;
}

/^$/                            {   # Empty line, pass it thru
        print $0;
        next;
}

################ Rename common items ##############
/Restart/ && /fvwm/             { gsub("fvwm", "fvwm2"); } # try and leave paths alone
/GoodStuff/                     { gsub("GoodStuff", "FvwmButtons"); }

################ Highlight Colors ##############
/^[ \t]*HiBackColor[ \t]*/      {
        dflt["hibackcolor"]=hibackcolor=$2;
        printf ("#!%s (new command=HilightColor)\n", $0);
        if (hibackcolor != "" && hiforecolor != "" && !hilightcolor) {
           printf ("\n#Set the foreground and background color for selected windows\n");
           printf ("HilightColor   %s %s\n", hiforecolor, hibackcolor);
           hilightcolor=TRUE;
        } else
           hilightcolor=FALSE;
        next;
}

/^[ \t]*HiForeColor[ \t]*/      {
        dflt["hiforecolor"]=hiforecolor=$2;
        printf ("#!%s (new command=HilightColor)\n", $0);
        if (hibackcolor != "" && hiforecolor != "" && !hilightcolor) {
           printf ("\n#Set the foreground and background color for selected windows\n");
           printf ("HilightColor   %s %s\n", hiforecolor, hibackcolor);
           hilightcolor=TRUE;
        } else
           hilightcolor=FALSE;
        next;
}

########## Menu Colors, Style and Font ###########
/^[ \t]*MenuForeColor[ \t]*/    {
        dflt["menuforecolor"]=menuforecolor=$2;
        printf ("#!%s (new command=MenuStyle)\n", $0);
        if (menubackcolor != "" && menuforecolor != "" && menustipplecolor != "" && font != "" && mwmmenus != "" && !menustyle) {
           printf ("\n#Set the foreground, background and stipple color and font for menus\n");
           printf ("MenuStyle   %s %s %s %s %s\n", menuforecolor, menubackcolor, menustipplecolor, font, mwmmenus);
           menustyle=TRUE;
        } else
           menustyle=FALSE;
        next;
}

/^[ \t]*MenuBackColor[ \t]*/    {
        dflt["menubackcolor"]=menubackcolor=$2;
        printf ("#!%s (new command=MenuStyle)\n", $0);
        if (menubackcolor != "" && menuforecolor != "" && menustipplecolor != "" && font != "" && mwmmenus != "" && !menustyle) {
           printf ("\n#Set the foreground, background and stipple color and font for menus\n");
           printf ("MenuStyle   %s %s %s %s %s\n", menuforecolor, menubackcolor, menustipplecolor, font, mwmmenus);
           menustyle=TRUE;
        } else
           menustyle=FALSE;
        next;
}

/^[ \t]*MenuStippleColor[ \t]*/ {
        dflt["menustipplecolor"]=menustipplecolor=$2;
        printf ("#!%s (new command=MenuStyle)\n", $0);
        if (menubackcolor != "" && menuforecolor != "" && menustipplecolor != "" && font != "" && mwmmenus != "" && !menustyle) {
           printf ("\n#Set the foreground, background and stipple color and font for menus\n");
           printf ("MenuStyle   %s %s %s %s %s\n", menuforecolor, menubackcolor, menustipplecolor, font, mwmmenus);
           menustyle=TRUE;
        } else
           menustyle=FALSE;
        next;
}

/^[ \t]*MWMMenus[ \t]*/         {
        dflt["mwmmenus"]=mwmmenus="mwm";
        printf ("#!%s (new command=MenuStyle)\n", $0);
        if (menubackcolor != "" && menuforecolor != "" && menustipplecolor != "" && font != "" && mwmmenus != "" && !menustyle) {
           printf ("\n#Set the foreground, background and stipple color and font for menus\n");
           printf ("MenuStyle   %s %s %s %s %s\n", menuforecolor, menubackcolor, menustipplecolor, font, mwmmenus);
           menustyle=TRUE;
        } else
           menustyle=FALSE;
        next;
}

/^[ \t]*Font[ \t]*/             {
        dflt["font"]=font=$2;
        printf ("#!%s (new command=MenuStyle)\n", $0);
        if (menubackcolor != "" && menuforecolor != "" && menustipplecolor != "" && font != "" && mwmmenus != "" && !menustyle) {
           printf ("\n#Set the foreground, background and stipple color and font for menus\n");
           printf ("MenuStyle   %s %s %s %s %s\n", menuforecolor, menubackcolor, menustipplecolor, font, mwmmenus);
           menustyle=TRUE;
        } else
           menustyle=FALSE;
        next;
}

# Translate both old ButtonStyle formats to the new format:
/^[ \t]*ButtonStyle[ \t]*/      {
        if ($2 == ":") {  # new style already
           if (NF != $4+4)
               print "ERROR: ButtonStyle command incorrect" >"/dev/stderr";
           printf ("%s %d %d", $1, $3, $4);
           for (i=5; i<=NF; ++i)
               printf (" %s", $i);
           printf ("\n");
        } else {
           print "Note: Conversion of old ButtonStyle; values rounded" \
                        >"/dev/stderr"
           printf ("#!         Old line was: %s\n", $0);
           p=index ($3,"x");
           x=substr($3,1,p-1)/2;
           y=substr($3,p+1)/2;
           printf ("%s %s 5 %dx%d@0 %dx%d@0 %dx%d@0 %dx%d@1 %dx%d@1\n",
                    $1, $2, 50-x,50+y, 50+x,50+y, 50-x,50-y, 50+x,50-y,
                    50-x,50+y);
        }
        next;
}

########## Standard Colors ###########
/^[ \t]*StdForeColor[ \t]*/     {
        dflt["stdforecolor"]=stdforecolor=$2;
        printf ("#!%s (new command=Style \"*\" Color f/b)\n", $0);
        print "Style \"*\" ForeColor " $2;
        next;
}

/^[ \t]*StdBackColor[ \t]*/     {
        dflt["stdbackcolor"]=stdbackcolor=$2;
        printf ("#!%s (new command=Style \"*\" Color f/b)\n", $0);
        print "Style \"*\" BackColor " $2;
        next;
}

########## Icon Related Stuff ##########
/^[ \t]*IconBox[ \t]*/          { print "Style \"*\" " $0; next; }
/^[ \t]*IconFont[ \t]*/         { print $0; next; }
/^[ \t]*SuppressIcons[ \t]*/    { print "Style \"*\" NoIcon"; next; }
/^[ \t]*StickyIcons[ \t]*/      { print "Style \"*\" StickyIcon"; next; }
/^[ \t]*ModulePath[ \t]*/       { gsub("/fvwm", "/fvwm2"); print $0; next; }
/^[ \t]*PixmapPath[ \t]*/       { gsub("/fvwm", "/fvwm2"); print $0; next; }
/^[ \t]*IconPath[ \t]*/         { gsub("/fvwm", "/fvwm2"); print $0; next; }
# note: Icon must be followed by some white space
/^[ \t]*Icon[ \t]+/             { printf "Style %s Icon %s\n", $2, $3; next; }

########## MWM hints ##########
/^[ \t]*MWMFunctionHints[ \t]*/ { printf ("Style \"*\" MWMFunctions\n"); next; }
/^[ \t]*MWMDecor[ \t]*/         { printf ("Style \"*\" MWMDecor\n"); next; }
/^[ \t]*MWMDecorHints[ \t]*/    { printf ("Style \"*\" MWMDecor\n"); next; }
/^[ \t]*MWMBorders[ \t]*/       { printf ("Style \"*\" MWMBorder\n"); next; }
/^[ \t]*MWMButtons[ \t]*/       { printf ("Style \"*\" MWMButtons\n"); next; }
/^[ \t]*MWMHintOverride[ \t]*/  { printf ("Style \"*\" HintOverride\n"); next; }

########## Placement & Focus styles ##########
/^[ \t]*RandomPlacement[ \t]*/  { print "Style \"*\" " $0; placement = TRUE; next; }
/^[ \t]*SmartPlacement[ \t]*/   { print "Style \"*\" " $0; placement = TRUE; next; }
/^[ \t]*Sticky[ \t]*/           { printf "Style \"%s\" Sticky\n", $2; next; }
/^[ \t]*NoPPosition[ \t]*/      { print "Style \"*\" " $0; next; }
/^[ \t]*ClickToFocus[ \t]*/     { print "Style \"*\" " $0; next; }
/^[ \t]*SloppyFocus[ \t]*/      { print "Style \"*\" " $0; next; }
/^[ \t]*StaysOnTop[ \t]*/       { printf "Style \"%s\" StaysOnTop\n", $2; next; }
/^[ \t]*AutoRaise[ \t]*/                {
        print "#! " $0 " (use Module FvwmAuto)";
        print "AddToFunc \"InitFunction\" \"I\" Module FvwmAuto " $2;
        print "AddToFunc \"RestartFunction\" \"I\" Module FvwmAuto " $2;
        next;
}

########## Decoration styles ##########
/^[ \t]*BorderWidth[ \t]*/      { print "Style \"*\" " $0; next; }
/^[ \t]*HandleWidth[ \t]*/      { print "Style \"*\" " $0; next; }
/^[ \t]*DecorateTransients[ \t]*/ { print "Style \"*\" DecorateTransient"; next; }
/^[ \t]*XORvalue[ \t]*/         { print $0; next; }
/^[ \t]*BoundaryWidth[ \t]*/    { printf "Style \"*\" HandleWidth %s\n", $2; next; }
/^[ \t]*NoBoundaryWidth[ \t]*/  { print "Style \"*\" BorderWidth " $2; next; }
/^[ \t]*NoTitle[ \t]*/          { print "Style \"*\" " $0; next; }
/^[ \t]*NoBorder[ \t]*/         { print "Style \"*\" " $0; next; }

########## Etc ##########
/^[ \t]*Lenience[ \t]*/         { print "Style \"*\" " $0; next; }
/^[ \t]*Style[ \t]*/            { print $0; next; }
/^[ \t]*Key[ \t]*/              { print $0; next; }
/^[ \t]*Mouse[ \t]*/            {
        if (sub("[      ]Pop[uU]p[      ]", " Menu ")) {
            if (!warn["Mouse"]) {
                print "Note: Setting mouse bindings to sticky menus">"/dev/stderr";
                warn["Mouse"] = TRUE;
            }
            if (index($6, "\"") == 1) {
               gsub("\"", "")
               if (NF > 6) {
                  for (i = 6; i <= NF; i++)
                    sub($i " ", $i)
               }
            }
            sub("$", " Nop");
        }
        print $0; next;
}

/^[ \t]*WindowListSkip[ \t]*/   { printf "Style %s WindowListSkip", $2; next; }
/^[ \t]*WindowFont[ \t]*/       { print $0; next; }
/^[ \t]*ClickTime[ \t]*/                { print $0; next; }
/^[ \t]*OpaqueMove[ \t]*/       { print "OpaqueMoveSize " $2; next; }
/^[ \t]*EdgeScroll[ \t]*/       { print $0; next; }
/^[ \t]*EdgeResistance[ \t]*/   { print $0; next; }
/^[ \t]*DeskTopSize[ \t]*/      { print $0; next; }
/^[ \t]*DeskTopScale[ \t]*/     {
        printf ("#!%s (new command=*FvwmPagerDeskTopScale <scale>)\n", $0);
        print "*FvwmPagerDeskTopScale " $2;
        next;
}

/^[ \t]**FvwmButtons[ \t]*/     {
        sub("[  ]Swallow[       ]*[^    ]*", "& Exec");
        print $0;
        if (length($0) > 199)
        {
            print "Warning: line too long" >"/dev/stderr";
            print ">> " $0 >"/dev/stderr";
        }
        if (!warn["GoodStuff"])
        {
            print "Note: GoodStuff renamed to FvwmButtons" >"/dev/stderr";
            warn["GoodStuff"]=TRUE;
        }
        next;
}

/^\*/                           {
        # other Module Configuration commands are passed thru
        print $0;
        next;
}

# hack: Modules spawned outside of a function, menu, or popup cannot have leading whitespace.
# add these to the initfunction
/^Module[ \t]*/                 { printf "AddToFunc \"InitFunction\" \"I\" %s \n", $0; next; }

# hack: function declarations cannot have leading whitespace
/^Function[ \t]*/               {
        if (inpopup)
           print "ERROR: EndPopup missing\n" NR $0 >"/dev/stderr";
        inpopup=FALSE;
        if (infunction)
           print "ERROR: EndFunction missing\n" NR $0 >"/dev/stderr";
        infunction=TRUE;
        prefix="AddToFunc " $2;
        next;
}

/^[ \t]*EndFunction[ \t]*/      {
        if (!infunction)
           print "ERROR: EndFunction outside of function" >"/dev/stderr";
        infunction=FALSE;
        prefix="";
        next;
}

# hack: popup declarations cannot have leading whitespace
/^Popup/                        {
        if (inpopup)
           print "ERROR: EndPopup missing\n" NR $0 >"/dev/stderr";
        if (infunction)
           print "ERROR: EndFunction missing\n" NR $0 >"/dev/stderr";
        infunction=FALSE;
        inpopup=TRUE;

        if (index($2, "\"") == 1) {
           tstr = ""
           for (i = 2; index(substr($i, 2), "\"") < length($i) && i <= NF; i++)
              tstr = sprintf("%s%s", tstr, $i);
           prefix = "AddToMenu " substr(tstr, 2, length(tstr) - 2)
        } else
           prefix="AddToMenu " $2;
        next;
}

/^[ \t]*EndPopup[ \t]*/         {
        if (!inpopup)
           print "ERROR: EndPopup outside of popup" >"/dev/stderr";
        inpopup=FALSE;
        prefix="";
        next;
}

########## Deleted Commands ##########
/^[ \t]*DontMoveOff[ \t]*/      ||
/^[ \t]*BackingStore[ \t]*/     ||
/^[ \t]*AppsBackingStore[ \t]*/ ||
/^[ \t]*SaveUnders[ \t]*/       ||
/^[ \t]*StubbornIcons[ \t]*/    ||
/^[ \t]*StubbornIconPlacement[ \t]*/ ||
/^[ \t]*StubbornPlacement[ \t]*/     ||
/^[ \t]*Cursor[ \t]*/           {
        print "#! " $0 " [deleted]";
        if (warned[$1]==FALSE) {
           print "Warning: " $1 " not in Fvwm2, command dropped" >"/dev/stderr";
           warned[$1] = TRUE;
        }
        next;
}

/^[ \t]*Pager[ \t]*/            {
        print "#! " $0 " [deleted]";
        if (warned[$1]==FALSE) {
           print "Warning: " $1 " omitted, internal pager is obsolete (use FvwmPager)" >"/dev/stderr";
           warned[$1] = TRUE;
        }
        next;
}

/^[ \t]*PagingDefault[ \t]*/    ||
/^[ \t]*TogglePage[ \t]*/       {
        print "#! " $0 " (use EdgeScroll 0 0)"; next;
        print "Warning: " $1 " not in Fvwm2, use EdgeScroll">"/dev/stderr";
}

########## Old Internal Pager Colors ###########
/^[ \t]*PagerForeColor[ \t]*/   ||
/^[ \t]*PagerBackColor[ \t]*/   {
        printf ("#!%s (new command=Style FvwmPager Color fore_color/back_color)\n", $0);
        if (warned[$1]==FALSE) {
           print "Warning: " $1 " omitted, internal pager is obsolete (use FvwmPager)" >"/dev/stderr";
           warned[$1] = TRUE;
        }
        next;
}

########## Sticky Colors ###########
/^[ \t]*StickyForeColor[ \t]*/  {
        printf ("#!%s (no sticky foreground color in fvwm2)\n", $0);
        if (warned[$1]==FALSE) {
           print "Warning: StickyForeColor not in fvwm2, omitted" > "/dev/stderr"
           print "         Use the Style command to assign each sticky window the same ForeColor" > "/dev/stderr"
        }
        next;
}

/^[ \t]*StickyBackColor[ \t]*/  {
        printf ("#!%s (no sticky background color in fvwm2)\n", $0);
        if (warned[$1]==FALSE) {
           print "Warning: StickyBackColor not in fvwm2, omitted" >"/dev/stderr"
           print "         Use the Style command to assign each sticky window the same BackColor" > "/dev/stderr"
        }
        next;
}

{
    if (infunction) {
        #gsub("[        ]PopUp[         ]", " "); }
        if ($2 == "\"Motion\"")
            context="\"M\"";
        else if ($2 == "\"Click\"")
            context="\"C\"";
        else if ($2 == "\"DoubleClick\"")
            context="\"D\"";
        else if ($2 == "\"Immediate\"")
            context="\"I\"";
        else context=$2;
                printf "%s", prefix " " context " " $1;
        for (i=3; i<=NF; ++i)
            printf (" %s", $i);
        printf ("\n");
        prefix="+             ";
        next;
    } else if (inpopup) {
        # not going to handle escaped quotes
        label=$2;
        first=3;
        quoted=substr(label, 1, 1)=="\"" &&
                substr(label, length(label), 1)!="\"";
        for (i=3;i<=NF && quoted;i++) {
            label=label " " $i;
            quoted=substr(label, length(label), 1)!="\"";
            first=i + 1;
        }
        printf ("%s %s %s", prefix, label, $1);
        for (i=first; i<=NF; ++i)
            printf (" %s", $i);
        printf ("\n");
        prefix="+             ";
        next;
    }

    if (warned[$1]==FALSE) {
        printf ("#!Warning: Keyword \"%s\" not handled yet\n", $1);
        warned[$1]=TRUE;
        print "Warning: Unknown keyword "$1" passed through">"/dev/stderr";
    }
    print $0;
    next;
}

END {
    if (!menustyle) {
        printf ("\n#Set the foreground, background and stipple color and font for menus\n");
        printf ("MenuStyle   %s %s %s %s %s\n", dflt["menuforecolor"], dflt["menubackcolor"], dflt["menustipplecolor"], dflt["font"], dflt["mwmmenus"]);
    }
    if (!hilightcolor) {
        printf ("\n#Set the foreground and background color for selected windows\n");
        printf ("HilightColor   %s %s\n", dflt["hiforecolor"], dflt["hibackcolor"]);
    }
    if (!placement) {
        printf "# overide default RandomPlacement and SmartPlacement Styles\n";
        printf "Style \"*\" %s\n", dflt["placement"];
    }
}
'
exit

---

From: Lionel Cons <[email-masked]>
Date: Wed, 4 Dec 1996 18:16:21 +0100

Grant McDorman writes:
 > to the current version. [...]

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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Grant McDorman <[email-masked]>
Date: Wed, 04 Dec 1996 12:25:20 -0500 (EST)

-----BEGIN PGP SIGNED MESSAGE-----

>  - ignore the case for popups (we had PopUp, Endpopup...)

Case should be ignored for this anyway, provided you are using GNU awk (gawk).
If you are not, I recommend you get it and use it.

> Popup   "Standard Tools" StdTools

Should be doable relatively easily, by adding a rule.

>  - handle menu names with spaces inside

I forget how those should be converted. Perhaps the new script handles this...