mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-09 22:10:09 +00:00
31 lines
870 B
TypeScript
31 lines
870 B
TypeScript
const dataurl = require('dataurl')
|
|
export const hterm = require('hterm-commonjs')
|
|
hterm.hterm.defaultStorage = new hterm.lib.Storage.Memory()
|
|
export const preferenceManager = new hterm.hterm.PreferenceManager('default')
|
|
|
|
|
|
hterm.hterm.VT.ESC['k'] = function(parseState) {
|
|
parseState.resetArguments();
|
|
|
|
function parseOSC(ps) {
|
|
if (!this.parseUntilStringTerminator_(ps) || ps.func == parseOSC) {
|
|
return
|
|
}
|
|
|
|
this.terminal.setWindowTitle(ps.args[0])
|
|
}
|
|
parseState.func = parseOSC
|
|
}
|
|
|
|
preferenceManager.set('user-css', dataurl.convert({
|
|
data: require('./components/terminal.userCSS.scss'),
|
|
mimetype: 'text/css',
|
|
charset: 'utf8',
|
|
}))
|
|
preferenceManager.set('background-color', '#1D272D')
|
|
preferenceManager.set('color-palette-overrides', {
|
|
0: '#1D272D',
|
|
})
|
|
|
|
hterm.hterm.Terminal.prototype.showOverlay = () => null
|