vfmg (DEVEL): vfmg - added simple ascii output with VT graphics (m...
sparky
sparky at pld-linux.org
Mon Nov 7 02:05:22 CET 2005
Author: sparky Date: Mon Nov 7 01:05:22 2005 GMT
Module: vfmg Tag: DEVEL
---- Log message:
- added simple ascii output with VT graphics (may be useful for debugging)
---- Files affected:
vfmg:
vfmg (1.73.2.35 -> 1.73.2.36)
---- Diffs:
================================================================
Index: vfmg/vfmg
diff -u vfmg/vfmg:1.73.2.35 vfmg/vfmg:1.73.2.36
--- vfmg/vfmg:1.73.2.35 Sun Nov 6 03:20:24 2005
+++ vfmg/vfmg Mon Nov 7 02:05:17 2005
@@ -39,8 +39,8 @@
my $o_output;
$defopt{xterm}="$ENV{'VFMG_TERM'}" if $ENV{'VFMG_TERM'};
-my @wms = qw(DR17 aewm afterstep blackbox enlightenment fbpanel fluxbox fvwm
- fvwm2 icewm metisse olvwm openbox qvwm wmaker wmaker-old xfce4 xpde);
+my @wms = qw(ASCII DR17 aewm afterstep blackbox enlightenment fbpanel fluxbox
+ fvwm fvwm2 icewm metisse olvwm openbox qvwm wmaker wmaker-old xfce4 xpde);
# %destdir and %iconsdir should only contain directories propsed by WM
my %destdir = (
@@ -825,6 +825,40 @@
;
}
+sub ASCII { # {{{
+ my ($no, $level)=@_;
+ my @apps;
+ my @tmp = ();
+ @tmp = %{$menu[$no]} if defined %{$menu[$no]};
+ my $all = ($#tmp + 1) / 2;
+ my $num = 0;
+ foreach my $entry (sort cmpdname keys %{$menu[$no]}) {
+ my $d = $desktop{$entry};
+ $num++;
+ if($menu[$no]{$entry} < 0) {
+ push @apps, $$d[LOCALENAME];
+ } else {
+ my $step = " \033(0\017x\033(B ";
+ if ($num >= $all and ( $#apps <= 0 )) {
+ $step = " ";
+ print "$level \033(0mq\033(B[$$d[LOCALENAME]]\n";
+ } else {
+ print "$level \033(0tq\033(B[$$d[LOCALENAME]]\n";
+ }
+ ASCII($menu[$no]{$entry},$level.$step);
+ }
+ }
+ $num = 0;
+ foreach my $app (@apps) {
+ if ($num >= $#apps) {
+ print "$level \033(0\017mq\033(B$app\n";
+ } else {
+ print "$level \033(0\017tq\033(B$app\n";
+ }
+ $num++;
+ }
+} # }}}
+
sub DR17 { # {{{
my ($no, $dir, $tab, $dr)=@_;
my $dirs = "";
@@ -1252,7 +1286,11 @@
}
# WM case {{{
-if ( $o_output eq "DR17" ) { # {{{
+if ( $o_output eq "ASCII" ) {
+ print "\n[Menu]\n";
+ ASCII($opt{strip},"");
+}
+elsif ( $o_output eq "DR17" ) { # {{{
die "Enlightenment DR17 requires icons scaling\n"
unless $opt{icons_scale};
die "Enlightenment DR17 conflicts with icons fork\n"
================================================================
---- CVS-web:
http://cvs.pld-linux.org/vfmg/vfmg?r1=1.73.2.35&r2=1.73.2.36&f=u
More information about the pld-cvs-commit
mailing list