Browse files

switch $cursor::color to IRC format if $USER is 'p6eval'

  • Loading branch information...
1 parent 442e075 commit ce183ea41c89c7df46b6bc55b275452f4588b473 vmspb committed Jul 12, 2012
Showing with 12 additions and 4 deletions.
  1. +12 −4 src/NieczaFrontendSTD.pm6
View
16 src/NieczaFrontendSTD.pm6
@@ -221,10 +221,18 @@ method check_old_cclass($) { } # NYI
# these stash entries were created in STD so they are considered to belong
# to STD, so we have to use an INIT to change them
INIT {
- $Cursor::RED = "\e[31m";
- $Cursor::GREEN = "\e[32m";
- $Cursor::YELLOW = "\e[33m";
- $Cursor::CLEAR = "\e[0m";
+# if %*ENV<COLOR_MODE> eq 'IRC' {
+ if %*ENV<USER> eq 'p6eval' {
+ $Cursor::RED = "\x[03]4" ~ "\x02\x02";
+ $Cursor::GREEN = "\x[03]3" ~ "\x02\x02";
+ $Cursor::YELLOW = "\x[03]8" ~ "\x02\x02";
+ $Cursor::CLEAR = "\x0f";
+ } else {
+ $Cursor::RED = "\e[31m";
+ $Cursor::GREEN = "\e[32m";
+ $Cursor::YELLOW = "\e[33m";
+ $Cursor::CLEAR = "\e[0m";
+ }
}
has $.lang;

0 comments on commit ce183ea

Please sign in to comment.