3 ms·
Install the crosh extension (which depends on the ssh extension). Now you have a better term in a standalone window. It's more configurable. You can open the j
by isr 9y ago
Install the crosh extension (which depends on the ssh extension). Now you have a better term in a standalone window.
It's more configurable. You can open the javascript console and set your preferred colours, turn off certain keybindings (so they can pass through to the stuff running inside your terminal), etc. Here's a dump of my notes on this:
----
● preferences
●● general info
See [^ nassh faq] (yes, not the 'hterm hack' file, confusing eh?) for details on how to configure.
See [^ pref mgr] for the full list of configurable preferences.
To configure, you need to:
- run crosh shell in a browser tab (not standalone window)
- open 'Developer Tools', console. This will open a javascript repl side-by-side with the crosh window, within the same browser tab
Get the current value of a preference:
term_.prefs_.get('OPTION NAME')
Set new value:
term_.prefs_.set('OPTION NAME', <NEW-VALUE>)
Reset to default:
term_.prefs_.reset('pref-name')
Reset all preferences to default:
localStorage.clear()
●● copy/paste
By default:
- selected text will be automatically copied
- Ctrl+Shift+v will paste into hterm
These defaults seem fine by me :)
●● basic changes
Fixes the ALT key (mostly, anyway):
term_.prefs_.set('alt-sends-what', '8-bit')
●● $TERM
Actually, hterm is already set to 'xterm-256color' by default. ChromeOS must change that to 'xterm' somewhere.
term_.prefs_.get('environment')
●● look & feel
The bloody scrollbar (I use gnu-screen's scrollback buffer instead) and bell are annoying:
term_.prefs_.set('scrollbar-visible', false)
term_.prefs_.set('audible-bell-sound', '')
This is my preferred font size (174x51). See [^ nassh faq] for more info on setting fonts, blinking cursors, etc.
term_.prefs_.set('font-size', 13)
Colours can be set using either:
- a CSS name
- in hex, with #rrggbb
- in decimal, with rgba(red, green, blue, opacity)
- opacity = a number from 0 to 1. Best suited for a semi-transparent cursor
term_.prefs_.set('foreground-color', 'ivory')
term_.prefs_.set('background-color', #002b36)
term_.prefs_.set('cursor-color', 'rgba(255, 20, 147, 0.75)')
See [^ css colors] for an easy to use chart.
●● override chrome shortcuts
There are many chrome shortcuts which get in the way. Running hterm/ssh in a seperate window will disable many of them (C-w, C-n, C-t).
Some are still left, like the Ctrl+<number> and Alt+<number> shortcuts (switch to n'th tab, switch to n'th widow). To disable these:
term_.prefs_.set('pass-ctrl-number', false)
term_.prefs_.set('pass-alt-number', false)
Use this in conjunction with chromeos/settings/"Keyboard settings"/"Treat top row keys as function keys". I'm not sure what the most convenient combo is, yet! Remember that Search+[1-0,-+] = F1 to F12, as well.
term_.prefs_.set('media-keys-are-fkeys', true)
- yebyen 9y agoWow! Thank you isr