+++ /dev/null
-diff -urN vfmg-0.9.18/README vfmg-current/README
---- vfmg-0.9.18/README 2004-03-12 18:45:11.000000000 +0100
-+++ vfmg-current/README 2004-03-12 07:26:29.000000000 +0100
-@@ -5,10 +5,6 @@
- - AfterStep, qvwm and xpde don't shrink icons (e.g. bigger png ones) - it looks funny;)
-
- TODO:
--- directory LegacyMixed!!!
--- limit szerokosci wyjscia
--- make use of convert
--- remove/set arguments
- - destination directory
- - main menu name
- - icons cache
-diff -urN vfmg-0.9.18/vfmg vfmg-current/vfmg
---- vfmg-0.9.18/vfmg 2004-09-07 18:07:08.000000000 +0200
-+++ vfmg-current/vfmg 2005-03-15 20:01:25.000000000 +0100
-@@ -1,5 +1,5 @@
- #!/usr/bin/perl -w
--#$Id$
-+#$Id$
-
- use strict;
- use File::Find;
-@@ -41,7 +41,7 @@
- );
-
- if($o_help) {
-- print "Usage: $0 [options] {aewm, afterstep, blackbox, enlightenment, fbpanel, fluxbox, fvwm2, icewm, openbox, olvwm, qvwm, wmaker, wmaker-old, xfce4, xpde}
-+ print "Usage: $0 [options] {aewm, afterstep, blackbox, enlightenment, fbpanel, fluxbox, fvwm, fvwm2, icewm, metisse, openbox, olvwm, qvwm, wmaker, wmaker-old, xfce4, xpde}
- -h, --help - print this help
- -t, --tags - echo omitted tags to stderr
- -e, --end - echo omitted XDG file ending to stderr
-@@ -60,12 +60,14 @@
- exit;
- }
-
--die "Missing argument {aewm, afterstep, blackbox, enlightenment, fbpanel, fluxbox, fvwm2, icewm, openbox, olvwm, qvwm, wmaker, wmaker-old, xfce4, xpde}\n"
-+die "Missing argument {aewm, afterstep, blackbox, enlightenment, fbpanel, fluxbox, fvwm, fvwm2, icewm, metisse, openbox, olvwm, qvwm, wmaker, wmaker-old, xfce4, xpde}\n"
- unless exists $ARGV[0];
- $o_output=$ARGV[0];
- die "Unrecognized argument: $o_output\n"
-- unless $o_output=~/^(aewm|afterstep|blackbox|enlightenment|fbpanel|fluxbox|fvwm2|icewm|openbox|olvwm|qvwm|wmaker|wmaker-old|xfce4|xpde)$/;
-+ unless $o_output=~/^(aewm|afterstep|blackbox|enlightenment|fbpanel|fluxbox|fvwm|fvwm2|icewm|metisse|openbox|olvwm|qvwm|wmaker|wmaker-old|xfce4|xpde)$/;
-
-+$o_full=1 if $o_icons and $o_output=~/^(enlightenment|metisse)$/;
-+
- my $tmp="$ENV{'HOME'}/.local/share";
- $tmp="$ENV{'XDG_DATA_HOME'}" if $ENV{'XDG_DATA_HOME'};
- my @tmp=("/usr/local/share","/usr/share");
-@@ -184,6 +186,8 @@
- my $exists=0;
- foreach my $dir(@icondirs) {
- if(-f "$dir$icon") {
-+ } elsif(-f "$dir$icon.svg") {
-+ $icon.=".svg";
- } elsif(-f "$dir$icon.xpm") {
- $icon.=".xpm";
- } elsif(-f "$dir$icon.png") {
-@@ -281,42 +285,57 @@
- my $tag;
- my $name;
- my $dir;
-+my $icon_dir;
- my @directory; # $directory[level]=[name,icon]
- my $include;
--my @tmpapps;
-+my $tmpapps;
- my @menustack;
-
- sub cand {
- my @iapps; # internal applications list
- my $name;
-- @iapps=@apps;
-+ my $firstrun=1;
- while (1) {
- $tag=lc(gettag());
- last if($tag eq '/and');
- if($tag eq 'category') {
- $dir=getname();
-- foreach $name(0..$#iapps) {
-- delete($iapps[$name]) unless exists $iapps[$name]{$dir};
-+ if($firstrun) {
-+ foreach $name(0..$#happs) {
-+ $iapps[$name]=$apps[$name] if exists $apps[$name]{$dir};
-+ }
-+ $firstrun=0;
-+ } else {
-+ foreach $name(0..$#iapps) {
-+ delete($iapps[$name]) unless exists $iapps[$name]{$dir};
-+ }
- }
- gettag(); # must be </category> else GIGO and we don't care
- next;
- }
- if($tag=~/^(and|or|not)$/) {
- if ($tag eq 'or') {
-- @tmpapps=cor();
-+ $tmpapps=cor();
- } elsif ($tag eq 'and') {
-- @tmpapps=cand();
-+ $tmpapps=cand();
- } else {
-- @tmpapps=cnot();
-+ $tmpapps=cnot();
- }
-- foreach $name(0..$#iapps) {
-- delete($iapps[$name]) unless defined $tmpapps[$name];
-+ if($firstrun) {
-+ foreach $name(0..$#$tmpapps) {
-+ $iapps[$name]=$apps[$name] if defined $tmpapps->[$name];
-+ }
-+ $firstrun=0;
-+ } else {
-+ foreach $name(0..$#iapps) {
-+ delete($iapps[$name]) unless defined $tmpapps->[$name];
-+ }
- }
- next;
- }
- warn "warning: possible XDG file corruption!: $tag\n" if $o_verbose;
- }
-- @iapps;
-+ \@iapps;
- }
-
- sub cor {
-@@ -335,20 +354,20 @@
- }
- if($tag=~/^(and|or|not)$/) {
- if ($tag eq 'or') {
-- @tmpapps=cor();
-+ $tmpapps=cor();
- } elsif ($tag eq 'and') {
-- @tmpapps=cand();
-+ $tmpapps=cand();
- } else {
-- @tmpapps=cnot();
-+ $tmpapps=cnot();
- }
-- foreach $name(0..$#tmpapps) {
-- $iapps[$name]=1 if defined $tmpapps[$name];
-+ foreach $name(0..$#$tmpapps) {
-+ $iapps[$name]=1 if defined $tmpapps->[$name];
- }
- next;
- }
- warn "warning: possible XDG file corruption!: $tag\n" if $o_verbose;
- }
-- @iapps;
-+ \@iapps;
- }
-
- sub cnot {
-@@ -369,20 +388,20 @@
- if($tag=~/^(and|or|not)$/) { # I think it doesn't make any sense
- warn "How did you get here!?\n" if $o_verbose;
- if ($tag eq 'or') {
-- @tmpapps=cor();
-+ $tmpapps=cor();
- } elsif ($tag eq 'and') {
-- @tmpapps=cand();
-+ $tmpapps=cand();
- } else {
-- @tmpapps=cnot();
-+ $tmpapps=cnot();
- }
- foreach $name(0..$#iapps) {
-- delete($iapps[$name]) if defined $tmpapps[$name];
-+ delete($iapps[$name]) if defined $tmpapps->[$name];
- }
- next;
- }
- warn "warning: possible XDG file corruption!: $tag\n" if $o_verbose;
- }
-- @iapps;
-+ \@iapps;
- }
-
- @tmp=grep -d, map {"$_/desktop-directories/"} @xdg_data_dirs;
-@@ -400,14 +419,14 @@
- }
- if(($tag=~/^(and|or|not)$/)&& $include) {
- if ($tag eq 'or') {
-- @tmpapps=cor();
-+ $tmpapps=cor();
- } elsif ($tag eq 'and') {
-- @tmpapps=cand();
-+ $tmpapps=cand();
- } else {
-- @tmpapps=cnot();
-+ $tmpapps=cnot();
- }
-- foreach my $name(0..$#tmpapps) {
-- next unless defined $tmpapps[$name];
-+ foreach my $name(0..$#$tmpapps) {
-+ next unless defined $tmpapps->[$name];
- foreach my $dir (keys %{$apps[$name]}) {
- $menu[$mno]{$happs[$name][0]}=[-1,$happs[$name][1],$happs[$name][2]];
- }
-@@ -609,6 +628,25 @@
- }
- }
-
-+my $DoConvert = `which convert`;
-+sub scale_icon {
-+ my $icon_in = $_[0];
-+
-+ return $icon_in unless $DoConvert;
-+
-+ my $icon_out = $icon_in;
-+ my $icon_ext = $_[1];
-+ my $convert_options = $_[2];
-+
-+ $icon_out =~ s/^.*\///;
-+ $icon_out =~ s/\..*$//;
-+ $icon_out = "$icon_dir/$icon_out.$icon_ext";
-+ if( ! -f "$icon_out") {
-+ system("convert $convert_options $icon_in $icon_out");
-+ }
-+ return $icon_out;
-+}
-+
- $level="";
- sub icewm {
- my $no=$_[0];
-@@ -719,6 +757,7 @@
- sub afterstep {
- my $no=$_[0];
- my $dir=$_[1];
-+ print "dir=".$dir;
- foreach my $entry(keys %{$menu[$no]}) {
- $name=$entry;
- if($menu[$no]{$entry}[0]<0) {
-@@ -740,6 +779,41 @@
- }
- }
-
-+sub fvwm {
-+ my $no=$_[0];
-+ my $file=$_[1];
-+ $file=~s|^\.||;
-+ my $basename=$_[2];
-+ foreach my $entry(keys %{$menu[$no]}) {
-+ if($menu[$no]{$entry}[0]>=0) {
-+ $name=substr($entry,1);
-+ $name=~s|/||g;
-+ my $menutitle=$name;
-+ $name=~s/\s+/_/g;
-+ fvwm($menu[$no]{$entry}[0],"$file.$name","$menutitle");
-+ }
-+ }
-+ if (!$file) {
-+ return;
-+ }
-+ print "Popup \"$file\"\n";
-+ print "\tTitle \"$basename\"\n";
-+ foreach my $entry(keys %{$menu[$no]}) {
-+ if($menu[$no]{$entry}[0]<0) {
-+ $name=$entry;
-+ $name=~s/\"/\\\"/g;
-+ print "\tExec \"$name\"\texec $menu[$no]{$entry}[2]\n";
-+ } else {
-+ $name=substr($entry,1);
-+ $name=~s|/||g;
-+ my $menutitle=$name;
-+ $name=~s/\s+/_/g;
-+ print "\tPopup \"$menutitle\"\t$file.$name\n";
-+ }
-+ }
-+ print "EndPopup\n\n";
-+}
-+
- sub fvwm2 {
- my $no=$_[0];
- my $file;
-@@ -765,6 +839,46 @@
- print "\n";
- }
-
-+sub metisse {
-+ my $no=$_[0];
-+ my $file=$_[1];
-+ $file=~s|^\.||;
-+ my $basename=$_[2];
-+ my $icon="";
-+ foreach my $entry(keys %{$menu[$no]}) {
-+ if($menu[$no]{$entry}[0]>=0) {
-+ $name=substr($entry,1);
-+ $name=~s|/||g;
-+ my $menutitle=$name;
-+ $name=~s/\s+/_/g;
-+ metisse($menu[$no]{$entry}[0],"$file.$name","$menutitle");
-+ }
-+ }
-+ if (!$file) {
-+ return;
-+ }
-+ print "DestroyMenu $file\n";
-+ print "AddToMenu $file \"$basename\" Title\n";
-+ foreach my $entry(sort keys %{$menu[$no]}) {
-+ $icon=$menu[$no]{$entry}[1] if $o_icons;
-+ $icon=scale_icon($icon,"png","-geometry 21x18") if $icon;
-+ $icon="\%$icon\%" if $icon;
-+
-+ if($menu[$no]{$entry}[0]<0) {
-+ $name=$entry;
-+ $name=~s/\"/\\\"/g;
-+ print "+ \"$icon$name\"\tExec exec $menu[$no]{$entry}[2]\n";
-+ } else {
-+ $name=substr($entry,1);
-+ $name=~s|/||g;
-+ my $menutitle=$name;
-+ $name=~s/\s+/_/g;
-+ print "+ \"$icon$menutitle\"\tPopup\t$file.$name\n";
-+ }
-+ }
-+ print "\n";
-+}
-+
- sub olvwm {
- my $no=$_[0];
- foreach my $entry(sort keys %{$menu[$no]}) {
-@@ -831,16 +945,19 @@
- open $F_OUT, ">> $dir/$_[1].menu" or warn "$dir/$_[1].menu: $!\n";
- print $F_OUT "\"$_[2]\"\n";
- foreach my $entry(sort keys %{$menu[$no]}) {
-- $name=$entry;
-+ $name=encode($o_enc,$entry);
-+ my $icon="";
-+ $icon=$menu[$no]{$entry}[1] if $o_icons;
-+ $icon=scale_icon($icon,"png","-geometry 18x18") if $icon;
- if($menu[$no]{$entry}[0]<0) {
-- $name=~s/\"/\\\"/g;
-- print $F_OUT "\"$name\" \"$menu[$no]{$entry}[1]\" exec \"$menu[$no]{$entry}[2]\"\n";
-+ $name=~s/\"/\'/g;
-+ print $F_OUT "\"$name\" \"$icon\" exec \"$menu[$no]{$entry}[2]\"\n";
- } else {
- $name=substr($name,1);
- $name=~s|/||g;
- my $name2=$name;
-- $name2=~s/\"/\\\"/g;
-- print $F_OUT "\"$name2\" \"$menu[$no]{$entry}[1]\" menu \"$dir/$name2.menu\"\n";
-+ $name2=~s/\"/\'/g;
-+ print $F_OUT "\"$name2\" \"$icon\" menu \"$dir/$name2.menu\"\n";
- enlightenment($menu[$no]{$entry}[0],"$name","$name");
- }
- }
-@@ -914,10 +1031,15 @@
- }
- }
-
--$o_enc="utf-8" if ($o_utf and not $o_enc);
-+$o_enc||="utf-8" if $o_utf;
- #use open OUT => ':utf8';
--eval "use open OUT => ':locale'" unless $o_enc;
--binmode(STDOUT, ":encoding($o_enc)") if $o_enc;
-+#eval "use open OUT => ':locale'" unless $o_enc; # $o_enc always set
-+unless ($o_enc) {
-+ require I18N::Langinfo;
-+ I18N::Langinfo->import(qw(langinfo CODESET));
-+ $o_enc=langinfo(CODESET()) unless $o_enc;
-+}
-+binmode STDOUT, ":encoding($o_enc)";
-
- if($o_output eq "icewm") {
- icewm($o_strip);
-@@ -942,11 +1064,11 @@
- exit;
- }
- if($o_output eq "xfce4") {
-- print "<xfdesktop-menu>
-- <title name=\"Desktop Menu\" visible=\"yes\"/>\n" unless $o_nomenu;
-+ print "<xfdesktop-menu>\n";
-+ print "<title name=\"Desktop Menu\" visible=\"yes\"/>\n" unless $o_nomenu;
- $level.=" ";
- xfce4($o_strip);
-- print "</xfdesktop-menu>\n" unless $o_nomenu;
-+ print "</xfdesktop-menu>\n";
- exit;
- }
- if($o_output eq "afterstep") {
-@@ -965,6 +1087,10 @@
- afterstep($o_strip,$dir);
- exit;
- }
-+if($o_output eq "fvwm") {
-+ fvwm($o_strip,"", "fvwm");
-+ exit;
-+}
- if($o_output eq "fluxbox") { # This is the same as blackbox (I hope so)
- print "[begin] (Fluxbox)\n" unless $o_nomenu;
- blackbox($o_strip);
-@@ -976,6 +1102,19 @@
- fvwm2($o_strip);
- exit;
- }
-+
-+if($o_output eq "metisse") {
-+ $icon_dir="$ENV{'HOME'}/.fvwm-metisse/icons";
-+ if(! -d "$icon_dir") {
-+ if(-f "$icon_dir") {
-+ rename("$icon_dir","$icon_dir.old");
-+ }
-+ mkpath("$icon_dir",0,0700);
-+ }
-+ metisse($o_strip,"", "metisse");
-+ exit;
-+}
-+
- if($o_output eq "olvwm") {
- olvwm($o_strip);
- exit;
-@@ -997,6 +1136,13 @@
- rename("$dir","$dir.old");
- }
- mkpath("$dir",0,0700); # or die
-+ $icon_dir="$ENV{'HOME'}/.enlightenment/icons";
-+ if(! -d "$icon_dir") {
-+ if(-f "$icon_dir") {
-+ rename("$icon_dir","$icon_dir.old");
-+ }
-+ mkpath("$icon_dir",0,0700);
-+ }
- enlightenment($o_strip,"index","Enlightenment");
- exit;
- }
-diff -urN vfmg-0.9.18/vfmg.cron vfmg-current/vfmg.cron
---- vfmg-0.9.18/vfmg.cron 1970-01-01 01:00:00.000000000 +0100
-+++ vfmg-current/vfmg.cron 2004-10-22 03:15:43.000000000 +0200
-@@ -0,0 +1,2 @@
-+# regenerate default menus for different windowmanagers
-+15 */2 * * * root /etc/rc.d/init.d/vfmg restart >/dev/null 2>&1
-diff -urN vfmg-0.9.18/vfmg.html vfmg-current/vfmg.html
---- vfmg-0.9.18/vfmg.html 2004-08-01 08:13:58.000000000 +0200
-+++ vfmg-current/vfmg.html 2004-12-09 21:38:31.000000000 +0100
-@@ -4,7 +4,7 @@
- <title>VFolders Menu Generator home page</title>
- <meta name="author" content="gotar">
- <meta name="description" content="VFolders Menu Generator home page">
-- <meta name="keywords" content="vfmg, menu, window manager, vfolders, aewm, afterstep, blackbox, enlightenment, fluxbox, fvwm2, icewm, olvwm, qvwm, wmaker, xfce4, xpde, fbpanel, openbox">
-+ <meta name="keywords" content="vfmg, menu, window manager, vfolders, aewm, afterstep, blackbox, enlightenment, fluxbox, fvwm, fvwm2, icewm, metisse, olvwm, qvwm, wmaker, xfce4, xpde, fbpanel, openbox">
- <meta http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- </head>
- <body bgcolor=lightblue>
-@@ -38,8 +38,10 @@
- <a TARGET="_blank" href="http://enlightenment.org/">enlightenment</a>,
- <a TARGET="_blank" href="http://fbpanel.sourceforge.net/">fbpanel</a>,
- <a TARGET="_blank" href="http://fluxbox.sourceforge.net/">fluxbox</a>,
-+<a TARGET="_blank" href="http://www.fvwm.org/">fvwm</a>,
- <a TARGET="_blank" href="http://www.fvwm.org/">fvwm2</a>,
- <a TARGET="_blank" href="http://www.icewm.org/">icewm</a>,
-+<a TARGET="_blank" href="http://insitu.lri.fr/~chapuis/metisse/">metisse</a>,
- <a TARGET="_blank" href="http://www.phys.columbia.edu/~flame/olvwm.html">olvwm</a>,
- <a TARGET="_blank" href="http://www.icculus.org/openbox/">openbox</a>,
- <a TARGET="_blank" href="http://www.qvwm.org/">qvwm</a>,
-diff -urN vfmg-0.9.18/vfmg.init vfmg-current/vfmg.init
---- vfmg-0.9.18/vfmg.init 2004-07-07 15:39:20.000000000 +0200
-+++ vfmg-current/vfmg.init 2004-11-30 12:43:03.000000000 +0100
-@@ -1,11 +1,11 @@
- #!/bin/sh
--# $Id$
-+# $Id$
-
- # vfmg Regenaration for window managers menus
- #
- # chkconfig: 345 93 07
- #
--# description: Support fo fluxbox and XFCE4
-+# description: Support for fluxbox, XFCE4, fvwm, fvwm2
- #
- # author: Lukasz Pawelczyk <havner@pld-linux.org> 2004
-
-@@ -17,25 +17,36 @@
- fi
-
- case "$1" in
-- start|restart|reload|force-reload)
-+ start|restart|reload|force-reload)
-+ umask 022
- if is_yes "$FLUXBOX" && [ -f /etc/X11/fluxbox/menu2 ]; then
- show "Regenerating fluxbox menu"; busy
-- if vfmg -i -f -x -c -s fluxbox > /etc/X11/fluxbox/menu2 2>/dev/null; then ok; else fail; fi
-+ if vfmg -i -f -x -c -s fluxbox > /etc/X11/fluxbox/menu2. 2>/dev/null \
-+ && mv /etc/X11/fluxbox/menu2. /etc/X11/fluxbox/menu2; then ok; else fail; fi
- fi
-- if is_yes "$XFCE4" && [ -f /etc/xfce4/menu2.xml ]; then
-+ if is_yes "$XFCE4" && [ -f /etc/xdg/xfce4/desktop/menu2.xml ]; then
- show "Regenerating XFCE4 menu"; busy
-- if vfmg -i -f -x -c -u -m xfce4 > /etc/xfce4/menu2.xml 2>/dev/null; then ok; else fail; fi
-+ if vfmg -f -x -c -u -m xfce4 > /etc/xdg/xfce4/desktop/menu2.xml. 2>/dev/null \
-+ && mv -f /etc/xdg/xfce4/desktop/menu2.xml. /etc/xdg/xfce4/desktop/menu2.xml; then ok; else fail; fi
-+ fi
-+ if is_yes "$FVWM2" && [ -f /etc/X11/fvwm2/fvwm2.menu2 ]; then
-+ show "Regenerating FVWM2 menu"; busy
-+ if vfmg -i -f -x -c fvwm2 > /etc/X11/fvwm2/fvwm2.menu2. 2>/dev/null \
-+ && mv -f /etc/X11/fvwm2/fvwm2.menu2. /etc/X11/fvwm2/fvwm2.menu2; then ok; else fail; fi
-+ fi
-+ if is_yes "$FVWM" && [ -f /etc/X11/fvwm/fvwm.menu ]; then
-+ show "Regenerating FVWM menu"; busy
-+ if vfmg -f -x -c fvwm > /etc/X11/fvwm/fvwm.menu. 2>/dev/null \
-+ && mv -f /etc/X11/fvwm/fvwm.menu. /etc/X11/fvwm/fvwm.menu; then ok; else fail; fi
- fi
--
- touch /var/lock/subsys/vfmg
- ;;
-- stop)
--
-+ stop)
- rm -f /var/lock/subsys/vfmg
- ;;
-- status)
-+ status)
- ;;
-- *)
-+ *)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
- exit 3
- esac
-diff -urN vfmg-0.9.18/vfmg.sysconfig vfmg-current/vfmg.sysconfig
---- vfmg-0.9.18/vfmg.sysconfig 2004-07-06 23:28:10.000000000 +0200
-+++ vfmg-current/vfmg.sysconfig 2004-11-30 12:43:37.000000000 +0100
-@@ -3,6 +3,11 @@
-
- XFCE4="yes"
- FLUXBOX="yes"
-+FVWM2="yes"
-+FVWM="yes"
-+
-+# export VFMG_TERM="aterm -name xterm-%1 -e %2"
-+# export LANG=pl_PL
-
- # This must be last line !
- # vi:syntax=sh:tw=78:ts=8:sw=4
-diff -urN vfmg-0.9.18/vfmg-zsh vfmg-current/vfmg-zsh
---- vfmg-0.9.18/vfmg-zsh 2004-08-01 08:11:55.000000000 +0200
-+++ vfmg-current/vfmg-zsh 2004-12-09 21:38:31.000000000 +0100
-@@ -1,7 +1,7 @@
- #compdef vfmg
-
- _arguments \
-- ':Output:(aewm afterstep blackbox enlightenment fbpanel fluxbox fvwm2 icewm openbox olvwm qvwm wmaker wmaker-old xfce4 xpde)' \
-+ ':Output:(aewm afterstep blackbox enlightenment fbpanel fluxbox fvwm2 icewm metisse openbox olvwm qvwm wmaker wmaker-old xfce4 xpde)' \
- '(-h --help)'{-h,--help}'[print help]' \
- '(-t --tags)'{-t,--tags}'[echo omitted tags to stderr]' \
- '(-e --end)'{-e,--end}'[echo omitted XDG file ending to stderr]' \