-
-
Save lakshmankumar12/6eb25966865160eaf28f to your computer and use it in GitHub Desktop.
Solarized for Mosh Chrome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Solarized for Mosh Chrome | |
// Mosh does not seem to save profiles, so this sets the default 'mosh' profile. | |
// To reset, evaluate term_.prefs_.resetAll() | |
// Run in the JavaScript console of mosh_browser.html, which can be opened | |
// as explained here: | |
// https://github.com/rpwoodbu/mosh-chrome/wiki/FAQ#how-can-i-change-the-way-the-terminal-looks-font-color-etc | |
var htermProfiles = { | |
// Solarized Dark | |
'solarized-dark': { | |
'background-color': '#002b36', | |
'foreground-color': '#839496', | |
'cursor-color': 'rgba(131, 148, 150, 0.5)', | |
}, | |
// Solarized Light | |
'solarized-light': { | |
'background-color': '#fdf6e3', | |
'foreground-color': '#657b83', | |
'cursor-color': 'rgba(101, 123, 131, 0.5)', | |
} | |
}; | |
var setSettings = function(profile) { | |
console.log('Setting "mosh" profile to' + htermProfiles.name) | |
term_.prefs_.resetAll(); | |
for (var name in htermProfiles[profile]) { | |
console.log(name); | |
console.log(htermProfiles[profile]); | |
term_.prefs_.set(name, htermProfiles[profile][name]); | |
} | |
term_.prefs_.set('environment', { TERM: "xterm-256color" }) | |
term_.prefs_.set('color-palette-overrides', ['#073642', '#dc322f', | |
'#859900', '#b58900', '#268bd2', '#d33682', '#2aa198', '#eee8d5', | |
'#002b36', '#cb4b16', '#586e75', '#657b83', '#839496', '#6c71c4', | |
'#93a1a1', '#fdf6e3']); | |
term_.prefs_.set('font-size', 14); | |
term_.prefs_.set('enable-bold', false); | |
term_.prefs_.set('font-family', '"Fira Mono", "DejaVu Sans Mono", "Everson Mono", FreeMono, "Menlo", "Terminal", monospace'); | |
term_.prefs_.set('font-smoothing', 'subpixel-antialiased'); | |
}; | |
// To set to Solarized Light | |
// setSettings('solarized-light'); | |
// Or Solarized dark: | |
setSettings('solarized-dark'); | |
// Or reset | |
//term_.prefs_.resetAll(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment