feat (blend-settings): add support for copying text, switch to JetBrains Mono
This commit is contained in:
parent
4f7c481ce9
commit
e1374c1254
2 changed files with 14 additions and 2 deletions
|
@ -44,7 +44,7 @@ function createTerminalWindow() {
|
|||
|
||||
terminalWindow.loadFile('src/pages/terminal.html')
|
||||
|
||||
terminalWindow.setMenu(null)
|
||||
// terminalWindow.setMenu(null)
|
||||
}
|
||||
|
||||
function loadTerminalWindow(title, cmd) {
|
||||
|
|
|
@ -69,13 +69,25 @@
|
|||
experimentalCharAtlas: 'dynamic',
|
||||
theme: {
|
||||
background: '#242430'
|
||||
}
|
||||
},
|
||||
fontFamily: 'JetBrains Mono'
|
||||
});
|
||||
|
||||
once = true
|
||||
|
||||
term.loadAddon(fit)
|
||||
|
||||
term.attachCustomKeyEventHandler((arg) => {
|
||||
if (arg.ctrlKey && arg.shiftKey && arg.code === "KeyC" && arg.type === "keydown") {
|
||||
const selection = term.getSelection();
|
||||
if (selection) {
|
||||
navigator.clipboard.writeText(selection);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
var term_e = document.getElementById('term');
|
||||
term.open(term_e);
|
||||
fit.fit()
|
||||
|
|
Loading…
Reference in a new issue