SVN: toys/rsget.pl/RSGet/Line.pm

sparky sparky at pld-linux.org
Sun Dec 19 23:39:22 CET 2010


Author: sparky
Date: Sun Dec 19 23:39:22 2010
New Revision: 12007

Modified:
   toys/rsget.pl/RSGet/Line.pm
Log:
- allow different progress colors


Modified: toys/rsget.pl/RSGet/Line.pm
==============================================================================
--- toys/rsget.pl/RSGet/Line.pm	(original)
+++ toys/rsget.pl/RSGet/Line.pm	Sun Dec 19 23:39:22 2010
@@ -154,8 +154,9 @@
 		if ( my $prog = $line->[2]->{prog} ) {
 			$thisline = $line->[0] . $text;
 			$thisline .= " " x ( $columns - length $thisline );
-			substr $thisline, $columns * $prog, 0, "\033[0;32m";
-			$thisline = "\033[30;42m$thisline$endcolor";
+			substr $thisline, $columns * $prog, 0, "\033[0;$color_to_term{$line->[3]}m";
+			my $bg = $color_to_term{$line->[3]} + 10;
+			$thisline = "\033[30;${bg}m$thisline$endcolor";
 		}
 		push @print, "\r\n\033[K" . $thisline;
 	}


More information about the pld-cvs-commit mailing list