]> dxcluster.org Git - spider.git/commitdiff
added some heristics for console/xterms
authordjk <djk>
Tue, 29 Jun 1999 00:03:13 +0000 (00:03 +0000)
committerdjk <djk>
Tue, 29 Jun 1999 00:03:13 +0000 (00:03 +0000)
perl/Console.pm

index 72c110ec2ce2c40da0ee92b973d66592194414d2..34c3913149e5e407c678223bd84f6319ba274c4b 100644 (file)
@@ -23,8 +23,15 @@ package main;
 
 $maxkhist = 100;
 $maxshist = 500;
-$foreground = COLOR_BLACK();
-$background = A_BOLD|COLOR_WHITE();
+if ($ENV{'TERM'} =~ /xterm/) {
+       $ENV{'TERM'} = 'color_xterm';
+       $foreground = COLOR_BLACK();
+       $background = A_BOLD|COLOR_WHITE();
+}
+if ($ENV{'TERM'} =~ /(console|linux)/) {
+       $foreground = COLOR_WHITE();
+       $background = COLOR_BLACK();
+}
 
 @colors = (
                   [ '^DX de [\-\w]+:\s+(14[45]\d\d\d|5[01]\d\d\d)', COLOR_PAIR(1) ],