Open startup terminal as a floating window

This commit is contained in:
SirBlob committed 2026-11-01 01:38:51 -05:00
1 parent 722e182076
commit 5d7e9857ca
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -52,9 +52,10 @@ class WindowManager {
return id in this.floatingRects;
}
openTerminal(startupCommand = '') {
openTerminal(startupCommand = '', options: { floating?: boolean } = {}) {
const terminal = { id: `kitty-${this.nextTerminalNumber++}`, startupCommand };
this.terminals.push(terminal);
if (options.floating) this.floatingRects[terminal.id] = null;
this.focus(terminal.id);
}
+1 -1
View File
@@ -28,7 +28,7 @@
onMount(() => {
themeState.restore();
const isWideScreen = window.innerWidth >= 768;
if (!pageOpen && isWideScreen && desktop.startupCommand) windowManager.openTerminal(desktop.startupCommand);
if (!pageOpen && isWideScreen && desktop.startupCommand) windowManager.openTerminal(desktop.startupCommand, { floating: true });
window.addEventListener('click', handleImageClick, true);
return () => window.removeEventListener('click', handleImageClick, true);
});