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.loadFile('src/pages/terminal.html')
|
||||||
|
|
||||||
terminalWindow.setMenu(null)
|
// terminalWindow.setMenu(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadTerminalWindow(title, cmd) {
|
function loadTerminalWindow(title, cmd) {
|
||||||
|
|
|
@ -69,13 +69,25 @@
|
||||||
experimentalCharAtlas: 'dynamic',
|
experimentalCharAtlas: 'dynamic',
|
||||||
theme: {
|
theme: {
|
||||||
background: '#242430'
|
background: '#242430'
|
||||||
}
|
},
|
||||||
|
fontFamily: 'JetBrains Mono'
|
||||||
});
|
});
|
||||||
|
|
||||||
once = true
|
once = true
|
||||||
|
|
||||||
term.loadAddon(fit)
|
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');
|
var term_e = document.getElementById('term');
|
||||||
term.open(term_e);
|
term.open(term_e);
|
||||||
fit.fit()
|
fit.fit()
|
||||||
|
|
Loading…
Reference in a new issue