From: djk Date: Tue, 29 Jun 1999 00:03:13 +0000 (+0000) Subject: added some heristics for console/xterms X-Git-Tag: R_1_30~6 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=63f443706c0121d92cbd5c73662e54bc1528f488;p=spider.git added some heristics for console/xterms --- diff --git a/perl/Console.pm b/perl/Console.pm index 72c110ec..34c39131 100644 --- a/perl/Console.pm +++ b/perl/Console.pm @@ -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) ],