repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

feat(quickshell): add launcher ipc surface

2b9a8f34e38fe02a3c2f587ce327c81ef16a4894

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (4)

docs/super/inventory/2026-06-17-quickshell-phase-4b-launcher-verification.md

Added
new file mode 100644
1 +# Quickshell Phase 4B Launcher Verification — 2026-06-17
3 +## Scope
5 +Added a hidden native launcher surface backed by Quickshell `DesktopEntries`. This is the future `SUPER+Space` replacement for `hyprlauncher`, but the Hypr bind remains unchanged until app launch and real keyboard navigation are proven.
7 +## Implemented files
9 +- `quickshell/nugu/Launcher.qml`
10 +- `quickshell/nugu/shell.qml` IPC wiring
11 +- `quickshell/nugu/README.md` usage notes
13 +## API probe
15 +Throwaway probes showed:
17 +- `DesktopEntries.applications` itself is an `UntypedObjectModel`; direct `Variants.model` use logs `Non list data ... assigned to Variants.model`.
18 +- `DesktopEntries.applications.values` works as the app list and can be filtered/sliced for `ScriptModel`.
20 +## IPC tested
22 +Temporary `XDG_CONFIG_HOME` named config was used; no live home symlink mutation.
24 +```sh
25 +qs ipc -c nugu call nugu openLauncher fire
26 +qs ipc -c nugu call nugu launcherVisible
27 +qs ipc -c nugu call nugu launcherMatchCount
28 +qs ipc -c nugu call nugu launcherFirstMatchName
29 +qs ipc -c nugu call nugu closeLauncher
30 +```
32 +Observed returns:
34 +```text
35 +open=fire
36 +visible=true
37 +count=1
38 +first=Firefox
39 +visible_after=false
40 +```
42 +Runtime output:
44 +```text
45 +INFO: Configuration Loaded
46 +```
48 +No QML errors, binding loops, reference errors, or lingering `qs` process were observed.
50 +## Screenshot
52 +- `/tmp/nugu-qs-launcher-fire.png`
54 +Vision check confirmed:
56 +- launcher popup is visible with Nugu border/background
57 +- search field contains `fire`
58 +- filtered result shows `Firefox`
59 +- text is readable
61 +The screenshot also shows a white square near the bottom edge. Vision classified it as likely underlying/redacted background content rather than a launcher result icon or cursor.
63 +## Still open before replacing `hyprlauncher`
65 +- Real keyboard navigation: type, up/down, escape, enter.
66 +- Safe app-launch validation without disrupting the desktop.
67 +- Arbitrary command mode only if current `hyprlauncher` setup actually depends on it.
68 +- Hypr `SUPER+Space` bind migration after Quickshell service is live and recoverable.

quickshell/nugu/Launcher.qml

Added
new file mode 100644
1 +import QtQuick
2 +import Quickshell
3 +import Quickshell.Wayland
5 +PanelWindow {
6 + id: root
8 + required property QtObject theme
9 + property bool open: false
10 + property string query: ""
12 + // Native launcher replaces `hyprlauncher` later, but stays hidden until IPC
13 + // or a future Hypr bind opens it. DesktopEntries avoids external parsers.
14 + visible: open
15 + focusable: open
16 + anchors { top: true; left: true; right: true }
17 + margins { top: 62 }
18 + exclusiveZone: -1
19 + implicitHeight: 330
20 + color: "transparent"
22 + WlrLayershell {
23 + layer: WlrLayer.Overlay
24 + namespace: "nugu-launcher"
25 + keyboardFocus: root.open ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
26 + }
28 + ScriptModel { id: matches }
30 + Connections {
31 + target: DesktopEntries.applications
32 + function onValuesChanged(): void { root.rebuild() }
33 + }
35 + Component.onCompleted: rebuild()
36 + onQueryChanged: rebuild()
37 + onOpenChanged: {
38 + if (open) Qt.callLater(search.forceActiveFocus)
39 + }
41 + function show(initialQuery: string): string {
42 + query = initialQuery
43 + open = true
44 + return query
45 + }
47 + function close(): void {
48 + open = false
49 + query = ""
50 + }
52 + function matchCount(): int { return matches.values.length }
53 + function firstMatchName(): string { return matches.values.length > 0 ? matches.values[0].name : "" }
55 + function rebuild(): void {
56 + const needle = query.toLowerCase().trim()
57 + const apps = DesktopEntries.applications.values || []
58 + matches.values = apps
59 + .filter(app => app && !app.noDisplay && app.name.length > 0)
60 + .filter(app => needle.length === 0 || searchableText(app).indexOf(needle) !== -1)
61 + .sort((a, b) => a.name.localeCompare(b.name))
62 + .slice(0, 12)
63 + results.currentIndex = matches.values.length > 0 ? 0 : -1
64 + }
66 + function searchableText(app): string {
67 + return [
68 + app.name,
69 + app.genericName,
70 + app.comment,
71 + app.id,
72 + app.categories.join(" "),
73 + app.keywords.join(" ")
74 + ].join(" ").toLowerCase()
75 + }
77 + function launchIndex(index: int): void {
78 + if (index < 0 || index >= matches.values.length) return
79 + const app = matches.values[index]
80 + close()
81 + app.execute()
82 + }
84 + MouseArea {
85 + anchors.fill: parent
86 + onClicked: root.close()
87 + }
89 + Rectangle {
90 + anchors.top: parent.top
91 + anchors.horizontalCenter: parent.horizontalCenter
92 + width: Math.min(parent.width - 32, 620)
93 + height: parent.height
94 + radius: 14
95 + color: `${theme.ui.backdrop}f2`
96 + border.width: 2
97 + border.color: theme.ui.accent
99 + Column {
100 + anchors.fill: parent
101 + anchors.margins: 14
102 + spacing: 10
104 + TextInput {
105 + id: search
106 + width: parent.width
107 + height: 42
108 + text: root.query
109 + onTextChanged: root.query = text
110 + color: theme.ui.important_global
111 + selectionColor: theme.ui.focus
112 + selectedTextColor: theme.content.backdrop
113 + font.family: "IBM Plex Sans"
114 + font.pixelSize: 20
115 + font.bold: true
116 + clip: true
118 + Rectangle {
119 + anchors.fill: parent
120 + anchors.margins: -6
121 + z: -1
122 + radius: 9
123 + color: theme.content.backdrop
124 + border.width: 1
125 + border.color: theme.ui.unfocus
128 + Keys.onPressed: event => {
129 + if (event.key === Qt.Key_Escape) {
130 + root.close()
131 + event.accepted = true
132 + } else if (event.key === Qt.Key_Down) {
133 + results.currentIndex = Math.min(results.currentIndex + 1, matches.values.length - 1)
134 + event.accepted = true
135 + } else if (event.key === Qt.Key_Up) {
136 + results.currentIndex = Math.max(results.currentIndex - 1, 0)
137 + event.accepted = true
138 + } else if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
139 + root.launchIndex(results.currentIndex)
140 + event.accepted = true
145 + ListView {
146 + id: results
147 + width: parent.width
148 + height: parent.height - search.height - parent.spacing
149 + model: matches
150 + clip: true
151 + spacing: 4
153 + delegate: Rectangle {
154 + id: row
155 + required property var modelData
156 + required property int index
158 + width: results.width
159 + height: 36
160 + radius: 8
161 + color: results.currentIndex === index ? theme.ui.focus : (rowMouse.containsMouse ? theme.ui.accent : "transparent")
163 + MouseArea {
164 + id: rowMouse
165 + anchors.fill: parent
166 + hoverEnabled: true
167 + onClicked: root.launchIndex(row.index)
170 + Row {
171 + anchors.fill: parent
172 + anchors.leftMargin: 10
173 + anchors.rightMargin: 10
174 + spacing: 10
176 + Image {
177 + width: 22
178 + height: 22
179 + anchors.verticalCenter: parent.verticalCenter
180 + source: Quickshell.iconPath(row.modelData.icon, true)
181 + fillMode: Image.PreserveAspectFit
182 + visible: source.length > 0
185 + Column {
186 + anchors.verticalCenter: parent.verticalCenter
187 + width: parent.width - 42
188 + spacing: 0
190 + Text {
191 + width: parent.width
192 + text: row.modelData.name
193 + color: (results.currentIndex === row.index || rowMouse.containsMouse) ? theme.content.backdrop : theme.ui.normal
194 + font.family: "IBM Plex Sans"
195 + font.pixelSize: 14
196 + font.bold: true
197 + elide: Text.ElideRight
200 + Text {
201 + width: parent.width
202 + text: row.modelData.comment || row.modelData.genericName || row.modelData.id
203 + color: (results.currentIndex === row.index || rowMouse.containsMouse) ? theme.content.backdrop : theme.ui.minor
204 + font.family: "IBM Plex Sans"
205 + font.pixelSize: 11
206 + elide: Text.ElideRight

quickshell/nugu/README.md

Modified
102 102 Hypr binds still use the old helpers until the OSD command path is verified with
103 103 real key events and screenshots.
105 +## Phase 4B launcher IPC
107 +Phase 4B adds a native DesktopEntries launcher, still hidden until IPC opens it.
108 +This is the future `SUPER+Space` replacement for `hyprlauncher`, but the live
109 +bind is not migrated until filtering, keyboard navigation, and app launching are
110 +verified in the real session.
112 +```sh
113 +qs ipc -c nugu call nugu openLauncher fire
114 +qs ipc -c nugu call nugu launcherVisible
115 +qs ipc -c nugu call nugu launcherMatchCount
116 +qs ipc -c nugu call nugu launcherFirstMatchName
117 +qs ipc -c nugu call nugu closeLauncher
118 +```

quickshell/nugu/shell.qml

Modified
67 67 function hideOsd(): void { osd.hide() }
68 68 function showVolumeOsd(level: string): string { return osd.showText(`Volume ${level}`, "info") }
69 69 function showBrightnessOsd(level: string): string { return osd.showText(`Brightness ${level}`, "warning") }
71 + // Launcher IPC is the future `SUPER+Space` target. It stays opt-in until
72 + // desktop-entry filtering, keyboard navigation, and app launch are proven.
73 + function openLauncher(query: string): string { return launcher.show(query) }
74 + function closeLauncher(): void { launcher.close() }
75 + function launcherVisible(): bool { return launcher.open }
76 + function launcherMatchCount(): int { return launcher.matchCount() }
77 + function launcherFirstMatchName(): string { return launcher.firstMatchName() }
72 80 Loader {
82 90 theme: nuguTheme
93 + Launcher {
94 + id: launcher
95 + theme: nuguTheme
96 + }
85 98 // Create one bar per monitor, matching Ironbar's multi-output behavior.
86 99 Variants {
87 100 model: Quickshell.screens