altercation / solarized

precision color scheme for multiple applications (terminal, vim, etc.) with both dark/light modes
http://ethanschoonover.com/solarized
MIT License
15.82k stars 3.52k forks source link

Solarized in the tty virtual console. #294

Open eloyesp opened 10 years ago

eloyesp commented 10 years ago

I was trying to get solarized working on tty2, tty3, etc. (the ones available on Linux with ctrl-alt-f2). Finally I could do it with escapes codes, based on a post I found.

This can be achieved adding a bunch of codes to /etc/issue (that is loaded by getty).

The codes are: (the ascii escape character is not visible but it's there)

]P0073642]P1dc322f]P2859900]P3b58900]P4268bd2]P5d33682]P62aa198]P7eee8d5]P8002b36]P9cb4b16]PA586e75]PB657b83]PC839496]PD6c71c4]PE93a1a1]PFfdf6e3

The last one just clear the screen to fix the background color. May be they can be added somewhere in the repo to be easy to add for anyone, but I'm not sure where it should be.

iamchanghyunpark commented 10 years ago

The following code at the very bottom of my .bashrc worked!

if [ "$TERM" = "linux" ]; then echo -en "\e]P0073642" #black echo -en "\e]P1dc322f" #darkgrey echo -en "\e]P2859900" #darkred echo -en "\e]P3b58900" #red echo -en "\e]P4268bd2" #darkgreen echo -en "\e]P5d33682" #green echo -en "\e]P62aa198" #brown echo -en "\e]P7eee8d5" #yellow echo -en "\e]P8002b36" #darkblue echo -en "\e]P9cb4b16" #blue echo -en "\e]PA586e75" #darkmagenta echo -en "\e]PB657b83" #magenta echo -en "\e]PC839496" #darkcyan echo -en "\e]PD6c71c4" #cyan echo -en "\e]PE93a1a1" #lightgrey echo -en "\e]PFfdf6e3" #white clear #for background artifacting fi

blueyed commented 9 years ago

See also https://github.com/adeverteuil/console-solarized.

eloyesp commented 9 years ago

@blueyed Cool, it works, @altercation should it be linked somewhere in the repo?