Skip to content

Instantly share code, notes, and snippets.

@distransient
Last active April 12, 2016 05:25
Show Gist options
  • Save distransient/372e7c430ad3ecbfc585 to your computer and use it in GitHub Desktop.
Save distransient/372e7c430ad3ecbfc585 to your computer and use it in GitHub Desktop.
// to use, open a crosh session and press ctrl+shift+j to open up the inspector and navigate to the console
// copy paste this script and press enter and the preferences will be placed in localstorage so that they will
// load on subsequent crosh sessions.
//
// more information here: http://git.chromium.org/gitweb/?p=chromiumos/platform/assets.git;a=blob;f=chromeapps/nassh/doc/faq.txt
localStorage.clear() // reset so that options (specifically font-family) don't get weird.
term_.prefs_.set("environment", {TERM: "xterm-256color"})
term_.prefs_.set("audible-bell-sound", "") // disable error bell sound
term_.prefs_.set("scrollbar-visible", false) // tmux handles scrolling for me
// I use this to load a custom font via css, in this case, anonymous pro.
term_.prefs_.set("user-css", "http://fonts.googleapis.com/css?family=Anonymous+Pro:400,400italic,700,700italic&subset=latin,latin-ext,greek,cyrillic")
term_.prefs_.set("font-family", '"Anonymous Pro",'.concat(term_.prefs_.get("font-family")))
term_.prefs_.set("font-size", 20)
term_.prefs_.set("background-color", "#333333")
term_.prefs_.set("foreground-color", "#ffffff")
term_.prefs_.set("color-palette-overrides", [
"#333333" // black
, "#b93f31" // red
, "#73ac39" // green
, "#c0b05d" // brown
, "#413c68" // blue
, "#955b82" // purple
, "#3798a4" // cyan
, "#a4a4a4" // light gray
, "#6a6a6a" // dark gray
, "#ff7575" // light red
, "#adff61" // light green
, "#ffee7d" // yellow
, "#8e8aff" // light blue
, "#ce6bff" // pink
, "#80ffd9" // light cyan
, "#ffffff" // white
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment