vfmg (DEVEL): vfmg - colors in ASCII

sparky sparky at pld-linux.org
Fri Nov 11 22:29:05 CET 2005


Author: sparky                       Date: Fri Nov 11 21:29:03 2005 GMT
Module: vfmg                          Tag: DEVEL
---- Log message:
- colors in ASCII

---- Files affected:
vfmg:
   vfmg (1.73.2.37 -> 1.73.2.38) 

---- Diffs:

================================================================
Index: vfmg/vfmg
diff -u vfmg/vfmg:1.73.2.37 vfmg/vfmg:1.73.2.38
--- vfmg/vfmg:1.73.2.37	Thu Nov 10 14:26:02 2005
+++ vfmg/vfmg	Fri Nov 11 22:28:58 2005
@@ -820,7 +820,8 @@
 }
 
 sub ASCII { # {{{
-	my ($no, $level)=@_;
+	my ($no, $level, $cnum)=@_;
+	my $cnext = $cnum + 1;
 	my @apps;
 	my @tmp = ();
 	@tmp = %{$menu[$no]} if defined %{$menu[$no]};
@@ -832,22 +833,22 @@
 		if($menu[$no]{$entry} < 0) {
 			push @apps, $$d[LOCALENAME];
 		} else {
-			my $step = " \033(0\017x\033(B ";
-			if ($num >= $all and ( $#apps <= 0 )) {
+			my $step = " \033[${cnum}m\033(0\017x\033(B\033[0m ";
+			if ($num >= $all and ( $#apps < 0 )) {
 				$step = "   ";
-				print "$level \033(0mq\033(B[$$d[LOCALENAME]]\n";
+				print "$level \033[${cnum}m\033(0mq\033(B\033[${cnext}m\033[1m[$$d[LOCALENAME]]\033[0m\n";
 			} else {
-				print "$level \033(0tq\033(B[$$d[LOCALENAME]]\n";
+				print "$level \033[${cnum}m\033(0tq\033(B\033[${cnext}m\033[1m[$$d[LOCALENAME]]\033[0m\n";
 			}
-			ASCII($menu[$no]{$entry},$level.$step);
+			ASCII($menu[$no]{$entry},$level.$step, $cnext);
 		}
 	}
 	$num = 0;
 	foreach my $app (@apps) {
 		if ($num >= $#apps) {
-			print "$level \033(0\017mq\033(B$app\n";
+			print "$level \033[${cnum}m\033(0\017mq\033(B\033[${cnext}m$app\033[0m\n";
 		} else {
-			print "$level \033(0\017tq\033(B$app\n";
+			print "$level \033[${cnum}m\033(0\017tq\033(B\033[${cnext}m$app\033[0m\n";
 		}
 		$num++;
 	}
@@ -1281,8 +1282,8 @@
 
 # WM case {{{
 if ( $o_output eq "ASCII" ) {
-	print "\n[Menu]\n";
-	ASCII($opt{strip},"");
+	print "\n\033[31m\033[1m[Menu]\033[0m\n";
+	ASCII($opt{strip},"", 31);
 }
 elsif ( $o_output eq "DR17" ) { # {{{
 	die "Enlightenment DR17 requires icons scaling\n"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/vfmg/vfmg?r1=1.73.2.37&r2=1.73.2.38&f=u




More information about the pld-cvs-commit mailing list