The interface seems to have changed (at least at 106). Now you can use the following promise-based APIs.
x = await term_.storage_.getItems()
term_.storage_.setItem(
'/hterm/profiles/default/user-css',
'https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&display=swap')
- Press Ctrl+Shift+J.
- Use the following code to extract the setting object.
hterm.defaultStorage.storage_.getSettings(console.log)
- Right click on the object, select "Save as global variable". (It is strongly recommended you backup this object) Suppose it is saved in
temp1
. - Tweak. For example, the following code modify the terminal font to Fira Mono.
Note that fonts outside the font list provided in the preference page are allowed, but they are erased as soon as you reach the preference page again.hterm.defaultStorage.storage_.setSettings({ ...temp1, '/hterm/profiles/default/user-css-text': `x-screen { font-family: 'Fira Mono', 'Source Code Pro', 'Powerline For Source Code Pro', 'Noto Sans Mono' !important }`, '/hterm/profiles/default/user-css': 'http://mozilla.github.io/Fira/fira.css', }, console.log)