Add floating windows and btop system monitor
This commit is contained in:
1 parent
fd0b3b20a2
commit
201a1e0914
23 files changed
+1049
-36
No files matched your search
@@ -24,7 +24,7 @@
|
||||
.filter((item) => !('page' in item.open))
|
||||
.map((item) => ({
|
||||
label: item.label,
|
||||
detail: 'terminal' in item.open ? `kitty ${item.open.terminal}`.trim() : 'url' in item.open ? item.open.url : '',
|
||||
detail: launcherDetail(item.open),
|
||||
icon: item.icon,
|
||||
open: item.open
|
||||
}));
|
||||
@@ -66,6 +66,13 @@
|
||||
selectedIndex = Math.max(0, selectedIndex - 1);
|
||||
} else if (event.key === 'Enter') launch(filteredEntries[selectedIndex]);
|
||||
}
|
||||
|
||||
function launcherDetail(action: DesktopAction): string {
|
||||
if ('terminal' in action) return `kitty ${action.terminal}`.trim();
|
||||
if ('url' in action) return action.url;
|
||||
if ('app' in action) return action.app;
|
||||
return '';
|
||||
}
|
||||
</script>
|
||||
|
||||
<button class="backdrop" aria-label="Close launcher" onclick={close}></button>
|
||||
|
||||
Reference in new issue
Block a user