configuration for using solarized theme with crosh
If you are running ChromeOS, have a minimal chroot installed (no X), are working with it using mostly tmux/screen + editor of choice + other terminal tools, then this is a quick guide to set crosh up to properly use the solarized colorscheme. We do this by configuring crosh through the javascript console (ctrl+shift+j).
First (optional?) set crosh to 256 color mode by opening crosh, and entering the javascript console. Set $TERM:
term_.prefs_.set('environment', { TERM: "xterm-256color" })(not sure about the importance of this step, and screen-256color could probably work the same. I use tmux, and it's working with this.)
Secondly, set $TERM for your chroot session, in your .bashrc, .zshenv, whatever..
export TERM=screen-256coloror xterm-256color if you aren't using tmux/screen.
Thirdly, (optional) it's a good idea to force tmux into 256 color mode, so I have it aliased (.zshenv):
alias tmux="tmux -2"Now, we need to configure the colors for crosh:
base03 = "#002b36";
base02 = "#073642";
base01 = "#586e75";
base00 = "#657b83";
base0 = "#839496";
base1 = "#93a1a1";
base2 = "#eee8d5";
base3 = "#fdf6e3";
yellow = "#b58900";
orange = "#cb4b16";
red = "#dc322f";
magenta = "#d33682";
violet = "#6c71c4";
blue = "#268bd2";
cyan = "#2aa198";
green = "#859900";
term_.prefs_.set('color-palette-overrides',
[ base02 , red , green , yellow,
blue , magenta , cyan , base2,
base03 , orange , base01 , base00,
base0 , violet , base1 , base3 ]);This overrides the default color-palette with the palette matching the dark solarized colorscheme. In vim (or equivalent), set background=light should now work.
Here are some useful things. '...' usually means you can put some CSS-readable value, f.ex. '#bababa'.
Remove scrollbar? term_.prefs_.set('scrollbar-visible', false);
Disable bold? term_.prefs_.set('enable-bold', false)
Change foreground, background or cursor color: term_.prefs_.set('foreground-color', '...')
Blinking cursor? term_.prefs_.set('cursor-blink', false)
Screwed something up? Globally undo everything you changed: term_.prefs_.resetAll()
Some documentation is available here.