repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

feat(quickshell): add remaining bar surfaces

1b06d81a6a04306a4387ab1355ee7f270fc5be89

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (13)

docs/super/inventory/2026-06-17-quickshell-phase-2c-verification.md

Added
new file mode 100644
1 +# Quickshell Phase 2C Verification — 2026-06-17
3 +## Scope
5 +Phase 2C added remaining Ironbar bar surfaces while keeping Ironbar and Mako live: tray placeholder/forwarder, clipboard entry popup, bind-mode widget, Mako notification bridge, idle inhibit, power popup, and calendar popup.
7 +This is **not** final companion parity. Native notifications, launcher, full clipboard picker bind, OSDs, Hypr bind migration, service retirement, and Hypr config simplification remain later phases.
9 +## Commands
11 +- `dbus-run-session -- timeout 3s qs -p quickshell/nugu/shell.qml`
12 +- temporary `XDG_CONFIG_HOME` named config with `qs -c nugu`
13 +- `qs ipc -c nugu call nugu showBar`
14 +- `qs ipc -c nugu call nugu setThemeMode light`
15 +- `notify-send 'Nugu Phase 2C test' 'notification bridge count test'`
16 +- `makoctl dismiss --all`
17 +- `wdotool --backend wlr-protocols` for click validation
18 +- `systemctl --user --no-pager --plain is-active ironbar.service ironbar-workspaces.service mako.service`
20 +## Parse validation
22 +Final parse/start validation under `dbus-run-session` exited `124` via timeout and printed `Configuration Loaded`.
24 +Relevant output:
26 +```text
27 +INFO: Configuration Loaded
28 +```
30 +No QML parse/type errors, no required-property errors, no binding loops, and no missing component errors remained.
32 +## Fixes found during validation
34 +- Clipboard/calendar/power popovers initially used nested `PanelWindow`. Buttons toggled active state, but popups rendered behind/through app content or were not visible. Fixed by using anchored `PopupWindow` tied to the bar button and parent bar window.
35 +- Clipboard popup initially used nested `StatusItem` rows over a translucent background, causing poor readability. Fixed with opaque popup background and fixed-height clipped rows.
36 +- Calendar date numbers initially used a `QColor`/string comparison for highlight state, making non-current date contrast wrong. Fixed with explicit `highlighted` bool.
37 +- Automated clock click target shifted left after right-side widgets grew; verified calendar at actual clock position around x=540.
39 +## Visual validation
41 +Screenshots captured:
43 +- `/tmp/nugu-qs-2c-bar-dark.png`
44 +- `/tmp/nugu-qs-2c-bar-light.png`
45 +- `/tmp/nugu-qs-2c-clipboard-popup.png`
46 +- `/tmp/nugu-qs-2c-calendar-popup.png`
47 +- `/tmp/nugu-qs-2c-power-popup.png`
48 +- `/tmp/nugu-qs-2c-inhibit-on.png`
49 +- `/tmp/nugu-qs-2c-inhibit-cycle.png`
50 +- `/tmp/nugu-qs-2c-notification-count.png`
51 +- `/tmp/nugu-qs-2c-notification-empty.png`
53 +Vision checks confirmed:
55 +- dark/light bars readable with Ironbar still visible above
56 +- clipboard popup opens, shows five `cliphist` rows, and is readable with intended 30-char truncation
57 +- calendar popup opens, shows `June 2026`, weekday labels, date grid, and highlighted current day with good contrast
58 +- power popup opens, shows uptime and labels `lock`, `sleep`, `out`, `reboot`, `off`; destructive/session actions are visually muted/critical and implemented as dry-run except lock
59 +- inhibit toggles from `󰛊 inf` to active `󰅶 inf` and right-click cycles to `30m`
60 +- notification bridge shows nonzero `󰂞 1` after `notify-send` and returns to empty bell after `makoctl dismiss --all`
61 +- bind mode stays hidden because current Hypr Lua config has no submaps
62 +- tray area stays hidden because no tray clients were present during validation
64 +## Known gaps
66 +- Human visual approval is still required before Ironbar retirement.
67 +- Phase 2B wheel interactions for volume/brightness remain unproven with `wdotool`; manual or alternate input-tool verification is still required.
68 +- Tray menus need validation with a real tray client; no tray client was present during this run.
69 +- Clipboard popup is a five-row bar entry, not the full `SUPER+V` dmenu replacement; that belongs to Phase 4.
70 +- Power popup destructive actions intentionally dry-run; final logout/sleep/poweroff/reboot semantics belong to Phase 4 and require confirmation behavior.
72 +## Legacy service boundary
74 +```text
75 +ironbar.service active
76 +ironbar-workspaces.service active
77 +mako.service active
78 +quickshell.service inactive/not installed live
79 +```
81 +No lingering `qs` processes remained after validation.

docs/super/plans/2026-06-17-quickshell-hypr-companions-phase-2c-bar-surfaces.md

Added
new file mode 100644
1 +# Quickshell Hypr Companions Phase 2C Bar Surfaces Implementation Plan
3 +> **For agentic workers:** REQUIRED SUB-SKILL: Use /skill:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
5 +**Goal:** Complete the remaining Ironbar bar-surface parity while Ironbar remains live: tray, clipboard entry, bind mode, Mako notification bridge, idle inhibit, power popup, calendar popup, and final visual comparison.
7 +**Architecture:** Keep Quickshell as a hidden-by-default named config controlled by IPC. Add focused widgets and popups inside `quickshell/nugu`, reuse the existing `Theme`, `Commands`, `StatusItem`, and `Bar` boundaries, and keep external services authoritative until later roadmap phases replace them.
9 +**Tech Stack:** Quickshell 0.3.0, QML/QtQuick, `Quickshell.Services.SystemTray`, `Quickshell.Wayland.IdleInhibitor`, `Quickshell.Io.Process`, `Quickshell.Hyprland`, `cliphist`, `makoctl`, `uwsm`, Nugu palette JSON.
11 +**Roadmap:** `docs/super/roadmaps/2026-06-17-quickshell-hypr-companions-roadmap.md`
13 +**Architecture Spec:** `docs/super/specs/2026-06-17-quickshell-hypr-companions-architecture.md`
15 +**API Inventory:** `docs/super/inventory/2026-06-17-quickshell-phase-2c-surface-api-inventory.md`
17 +**Parity Checklist:** `docs/super/inventory/2026-06-17-quickshell-parity-checklist.md`
19 +**Phase:** Phase 2C: Remaining bar surfaces
21 +---
23 +## Scope Boundary
25 +This plan implements only the remaining Ironbar bar surfaces:
27 +- System tray display/menu forwarding.
28 +- Clipboard bar entry and tiny 5-row popup backed by `cliphist`.
29 +- Bind mode widget, hidden unless Hypr emits a submap event.
30 +- Notification status bridge backed by Mako, while Mako remains the daemon.
31 +- Idle inhibit widget backed by Wayland idle-inhibit protocol.
32 +- Power popup with lock active and destructive actions gated as dry-run/confirmation text.
33 +- Calendar popup on clock click.
34 +- Dark/light screenshots and visual comparison with Ironbar still running.
36 +Out of scope:
38 +- Native Quickshell notification daemon replacing Mako.
39 +- Launcher replacement.
40 +- Full clipboard picker replacing `hyprlauncher --dmenu` bind.
41 +- OSD replacement.
42 +- Hypr bind migration.
43 +- Stopping/disabling Ironbar, Mako, hyprlauncher, or hyprshutdown.
45 +Phase boundary: after this plan, Quickshell bar parity should be broad enough for human visual review while Ironbar remains recoverable and authoritative.
47 +Execution amendment: popup surfaces were implemented with anchored `PopupWindow` instead of nested `PanelWindow` after live validation showed nested panel popups toggled button state but did not render above app content reliably. `PopupWindow` is the correct Quickshell primitive for clipboard/calendar/power popovers.
49 +## File Structure
51 +Create:
53 +- `quickshell/nugu/TrayWidget.qml` — SystemTray icons and native menu forwarding.
54 +- `quickshell/nugu/ClipboardWidget.qml` — compact entry and 5-row popup.
55 +- `quickshell/nugu/BindModeWidget.qml` — Hypr submap status, hidden by default.
56 +- `quickshell/nugu/NotificationBridgeWidget.qml` — Mako count/restore/dismiss bridge.
57 +- `quickshell/nugu/InhibitWidget.qml` — idle-inhibit state/duration control.
58 +- `quickshell/nugu/PowerWidget.qml` — power button and popup.
59 +- `quickshell/nugu/CalendarPopup.qml` — small month popup used by the clock.
61 +Modify:
63 +- `quickshell/nugu/Commands.qml` — add power/clipboard/notification command helpers.
64 +- `quickshell/nugu/ClockWidget.qml` — open/close calendar popup on click.
65 +- `quickshell/nugu/Bar.qml` — add new widgets in Ironbar-compatible positions and attach idle inhibitor to bar window.
66 +- `quickshell/nugu/README.md` — document Phase 2C coverage and deferred replacements.
68 +Do not modify:
70 +- `hypr/modules/*`.
71 +- `ironbar/*`.
72 +- `mako/*`.
73 +- service manifests.
75 +## Task 1: Extend command boundary
77 +**Files:**
79 +- Modify: `quickshell/nugu/Commands.qml`
81 +- [ ] **Step 1: Replace `Commands.qml` with the Phase 2C command boundary**
83 +Write this file:
85 +```qml
86 +import QtQuick
87 +import Quickshell.Io
89 +Item {
90 + id: root
91 + visible: false
93 + // Keep all external process launches behind one object so widgets stay
94 + // declarative and future Hypr bind migration has one command boundary.
95 + property string sessionSlice: "session-graphical.slice"
96 + property string workSlice: "work.slice"
97 + property string lastClipboardPreview: ""
98 + property bool lastClipboardCopied: false
99 + property string lastPowerAction: ""
101 + function detached(args: var): void {
102 + runner.command = args
103 + runner.startDetached()
106 + function uwsm(slice: string, args: var): var {
107 + return ["uwsm", "app", "-s", slice, "--"].concat(args)
110 + function tui(slice: string, name: string): void {
111 + detached(uwsm(slice, ["wezterm", "start", "--class", name, "--", name]))
114 + function openWifi(): void { tui(sessionSlice, "impala") }
115 + function openBluetooth(): void { tui(sessionSlice, "bluetui") }
116 + function openSystemMonitor(): void { tui(workSlice, "btm") }
117 + function openAudioMixer(): void { tui(sessionSlice, "wiremix") }
119 + function openBattery(): void {
120 + detached(uwsm(sessionSlice, [
121 + "wezterm", "start", "--class", "battery", "--",
122 + "nu", "-c", "loop { clear; upower -i /org/freedesktop/UPower/devices/battery_BAT0; sleep 2sec }"
123 + ]))
126 + function restoreNotification(): void {
127 + detached(["makoctl", "restore"])
130 + function dismissNotifications(): void {
131 + detached(["makoctl", "dismiss", "--all"])
134 + function copyClipboardEntry(encoded: string, preview: string): void {
135 + lastClipboardPreview = preview
136 + clipboardCopy.command = ["sh", "-c", "printf '%s\\n' \"$1\" | cliphist decode | wl-copy", "sh", encoded]
137 + clipboardCopy.running = true
140 + function lock(): void {
141 + lastPowerAction = "lock"
142 + detached(["hyprlock"])
145 + function dryRunPower(action: string): void {
146 + // Phase 2C must not power off, reboot, logout, or suspend during tests.
147 + // Later phases can replace this with a confirmed execution path.
148 + lastPowerAction = `dry-run ${action}`
151 + Process { id: runner }
153 + Process {
154 + id: clipboardCopy
155 + onExited: (exitCode, exitStatus) => { root.lastClipboardCopied = exitCode === 0 }
158 +```
160 +- [ ] **Step 2: Parse-check**
162 +Run:
164 +```bash
165 +dbus-run-session -- sh -lc 'cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml' >/tmp/nugu-qs-2c-commands.out 2>/tmp/nugu-qs-2c-commands.err; code=$?; printf 'exit=%s\n' "$code"; grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Syntax|Cannot|Binding loop|required|failed to create' /tmp/nugu-qs-2c-commands.out | sed -n '1,180p'
166 +```
168 +Expected: exit `124`, `Configuration Loaded`, and no QML parse/type errors.
170 +## Task 2: Add notification bridge widget
172 +**Files:**
174 +- Create: `quickshell/nugu/NotificationBridgeWidget.qml`
175 +- Modify: `quickshell/nugu/Bar.qml`
177 +- [ ] **Step 1: Write `NotificationBridgeWidget.qml`**
179 +```qml
180 +import QtQuick
181 +import Quickshell.Io
182 +import "."
184 +StatusItem {
185 + id: root
187 + required property QtObject commands
189 + property int count: 0
191 + text: count > 0 ? `󰂞 ${count}` : "󰂚"
192 + active: count > 0
193 + minWidth: count > 0 ? 42 : 24
195 + // Mako remains the notification daemon in Phase 2C. Polling is temporary and
196 + // intentionally isolated so Phase 3 can swap in native notification state.
197 + onLeftClicked: commands.restoreNotification()
198 + onRightClicked: commands.dismissNotifications()
200 + Timer {
201 + running: true
202 + repeat: true
203 + interval: 5000
204 + triggeredOnStart: true
205 + onTriggered: poll.exec(["sh", "-c", "makoctl list 2>/dev/null | grep -c '^Notification '"])
208 + Process {
209 + id: poll
210 + stdout: StdioCollector {
211 + onStreamFinished: root.count = parseInt(this.text.trim() || "0", 10)
215 +```
217 +- [ ] **Step 2: Add notification widget to `Bar.qml` right section before WiFi**
219 +In the end `RowLayout`, place this before `WifiWidget`:
221 +```qml
222 + NotificationBridgeWidget { theme: root.theme; commands: root.commands }
223 +```
225 +- [ ] **Step 3: Parse-check**
227 +Run:
229 +```bash
230 +dbus-run-session -- sh -lc 'cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml' >/tmp/nugu-qs-2c-notifications.out 2>/tmp/nugu-qs-2c-notifications.err; code=$?; printf 'exit=%s\n' "$code"; grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Syntax|Cannot|Binding loop|required|failed to create|NotificationBridgeWidget|mako' /tmp/nugu-qs-2c-notifications.out | sed -n '1,220p'
231 +```
233 +Expected: exit `124`, no QML errors.
235 +## Task 3: Add bind mode widget
237 +**Files:**
239 +- Create: `quickshell/nugu/BindModeWidget.qml`
240 +- Modify: `quickshell/nugu/Bar.qml`
242 +- [ ] **Step 1: Write `BindModeWidget.qml`**
244 +```qml
245 +import QtQuick
246 +import Quickshell.Hyprland
247 +import "."
249 +StatusItem {
250 + id: root
252 + property string mode: ""
254 + text: mode.length > 0 ? `󰌌 ${mode}` : ""
255 + active: mode.length > 0
256 + minWidth: 60
258 + // Current Hypr Lua config has no submaps, so parity is hidden state. Listening
259 + // now preserves future bind-mode behavior without adding Hypr config.
260 + Connections {
261 + target: Hyprland
262 + function onRawEvent(event) {
263 + if (event.name !== "submap") return
264 + const parsed = event.parse(1)
265 + root.mode = parsed.length > 0 ? parsed[0] : ""
269 +```
271 +- [ ] **Step 2: Add bind mode widget to `Bar.qml` left section after workspaces**
273 +In the left `RowLayout`, place after `WorkspaceWidget`:
275 +```qml
276 + BindModeWidget { theme: root.theme }
277 +```
279 +- [ ] **Step 3: Parse-check**
281 +Run:
283 +```bash
284 +dbus-run-session -- sh -lc 'cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml' >/tmp/nugu-qs-2c-bindmode.out 2>/tmp/nugu-qs-2c-bindmode.err; code=$?; printf 'exit=%s\n' "$code"; grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Syntax|Cannot|Binding loop|required|failed to create|BindModeWidget|rawEvent' /tmp/nugu-qs-2c-bindmode.out | sed -n '1,220p'
285 +```
287 +Expected: exit `124`, no QML errors. Widget is hidden because current Hypr config has no submap.
289 +## Task 4: Add idle inhibit widget
291 +**Files:**
293 +- Create: `quickshell/nugu/InhibitWidget.qml`
294 +- Modify: `quickshell/nugu/Bar.qml`
296 +- [ ] **Step 1: Write `InhibitWidget.qml`**
298 +```qml
299 +import QtQuick
300 +import "."
302 +StatusItem {
303 + id: root
305 + property bool inhibiting: false
306 + property int durationIndex: 3
307 + readonly property var durations: [
308 + { "label": "30m", "milliseconds": 30 * 60 * 1000 },
309 + { "label": "1h", "milliseconds": 60 * 60 * 1000 },
310 + { "label": "2h", "milliseconds": 2 * 60 * 60 * 1000 },
311 + { "label": "inf", "milliseconds": 0 }
313 + readonly property var duration: durations[durationIndex]
315 + text: `${inhibiting ? "󰅶" : "󰛊"} ${duration.label}`
316 + active: inhibiting
317 + minWidth: 58
319 + signal inhibitChanged(bool enabled)
321 + onLeftClicked: {
322 + inhibiting = !inhibiting
323 + inhibitChanged(inhibiting)
324 + expiry.restart()
327 + onRightClicked: {
328 + durationIndex = (durationIndex + 1) % durations.length
329 + if (inhibiting) expiry.restart()
332 + Timer {
333 + id: expiry
334 + interval: root.duration.milliseconds
335 + repeat: false
336 + running: root.inhibiting && root.duration.milliseconds > 0
337 + onTriggered: {
338 + root.inhibiting = false
339 + root.inhibitChanged(false)
343 +```
345 +- [ ] **Step 2: Wire `IdleInhibitor` into `Bar.qml`**
347 +Add import:
349 +```qml
350 +import Quickshell.Wayland
351 +```
353 +Near the top of `PanelWindow`, add:
355 +```qml
356 + property bool idleInhibited: false
358 + IdleInhibitor {
359 + window: root
360 + enabled: root.idleInhibited
362 +```
364 +In the end `RowLayout`, place after `NotificationBridgeWidget`:
366 +```qml
367 + InhibitWidget {
368 + theme: root.theme
369 + onInhibitChanged: enabled => root.idleInhibited = enabled
371 +```
373 +- [ ] **Step 3: Parse-check**
375 +Run:
377 +```bash
378 +dbus-run-session -- sh -lc 'cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml' >/tmp/nugu-qs-2c-inhibit.out 2>/tmp/nugu-qs-2c-inhibit.err; code=$?; printf 'exit=%s\n' "$code"; grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Syntax|Cannot|Binding loop|required|failed to create|IdleInhibitor|InhibitWidget' /tmp/nugu-qs-2c-inhibit.out | sed -n '1,240p'
379 +```
381 +Expected: exit `124`, no QML errors.
383 +## Task 5: Add tray widget
385 +**Files:**
387 +- Create: `quickshell/nugu/TrayWidget.qml`
388 +- Modify: `quickshell/nugu/Bar.qml`
390 +- [ ] **Step 1: Write `TrayWidget.qml`**
392 +```qml
393 +import QtQuick
394 +import QtQuick.Layouts
395 +import Quickshell.Services.SystemTray
396 +import Quickshell.Widgets
398 +RowLayout {
399 + id: root
401 + required property QtObject theme
402 + required property var parentWindow
404 + spacing: 4
405 + visible: SystemTray.items.values.length > 0
407 + // Phase 2C uses native tray item activation/menu forwarding. Custom DBusMenu
408 + // rendering can wait until a concrete tray app proves native menus insufficient.
409 + Repeater {
410 + model: SystemTray.items
412 + Item {
413 + id: itemRoot
414 + required property var modelData
416 + Layout.preferredWidth: 22
417 + Layout.preferredHeight: 22
419 + Rectangle {
420 + anchors.fill: parent
421 + radius: 7
422 + color: mouse.containsMouse ? root.theme.ui.accent : "transparent"
425 + IconImage {
426 + anchors.centerIn: parent
427 + implicitSize: 14
428 + source: modelData.icon
431 + MouseArea {
432 + id: mouse
433 + anchors.fill: parent
434 + hoverEnabled: true
435 + acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
436 + onClicked: event => {
437 + if (event.button === Qt.RightButton || modelData.onlyMenu) {
438 + modelData.display(root.parentWindow, itemRoot.x, itemRoot.y + itemRoot.height)
439 + } else if (event.button === Qt.MiddleButton) {
440 + modelData.secondaryActivate()
441 + } else {
442 + modelData.activate()
445 + onWheel: event => modelData.scroll(event.angleDelta.y, false)
450 +```
452 +- [ ] **Step 2: Add tray widget to `Bar.qml` right section before notification bridge**
454 +```qml
455 + TrayWidget { theme: root.theme; parentWindow: root }
456 +```
458 +- [ ] **Step 3: Parse-check**
460 +Run:
462 +```bash
463 +dbus-run-session -- sh -lc 'cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml' >/tmp/nugu-qs-2c-tray.out 2>/tmp/nugu-qs-2c-tray.err; code=$?; printf 'exit=%s\n' "$code"; grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Syntax|Cannot|Binding loop|required|failed to create|SystemTray|TrayWidget|IconImage' /tmp/nugu-qs-2c-tray.out | sed -n '1,260p'
464 +```
466 +Expected: exit `124`, no QML errors.
468 +## Task 6: Add clipboard entry popup
470 +**Files:**
472 +- Create: `quickshell/nugu/ClipboardWidget.qml`
473 +- Modify: `quickshell/nugu/Bar.qml`
475 +- [ ] **Step 1: Write `ClipboardWidget.qml`**
477 +```qml
478 +import QtQuick
479 +import QtQuick.Layouts
480 +import Quickshell.Io
481 +import "."
483 +Item {
484 + id: root
486 + required property QtObject theme
487 + required property QtObject commands
489 + property bool open: false
490 + property var entries: []
492 + implicitWidth: button.implicitWidth
493 + implicitHeight: button.implicitHeight
495 + function refresh(): void {
496 + list.exec(["sh", "-c", "cliphist list | head -n 5"])
499 + StatusItem {
500 + id: button
501 + theme: root.theme
502 + text: "󰅌"
503 + minWidth: 24
504 + active: root.open
505 + onLeftClicked: {
506 + root.open = !root.open
507 + if (root.open) root.refresh()
509 + onMiddleClicked: {
510 + root.open = !root.open
511 + if (root.open) root.refresh()
515 + PanelWindow {
516 + visible: root.open
517 + anchors { top: true; left: true }
518 + margins { top: 36; left: 10 }
519 + exclusiveZone: -1
520 + implicitWidth: 360
521 + implicitHeight: Math.max(48, entries.length * 34 + 16)
522 + color: "transparent"
524 + Rectangle {
525 + anchors.fill: parent
526 + radius: 7
527 + color: `${root.theme.ui.backdrop}f2`
528 + border.width: 2
529 + border.color: root.theme.ui.accent
531 + ColumnLayout {
532 + anchors.fill: parent
533 + anchors.margins: 8
534 + spacing: 4
536 + Repeater {
537 + model: root.entries
539 + StatusItem {
540 + required property var modelData
541 + Layout.fillWidth: true
542 + theme: root.theme
543 + text: modelData.preview
544 + minWidth: 330
545 + onLeftClicked: {
546 + root.commands.copyClipboardEntry(modelData.encoded, modelData.preview)
547 + root.open = false
552 + Text {
553 + visible: root.entries.length === 0
554 + text: "clipboard empty"
555 + color: root.theme.ui.minor
556 + font.family: "IBM Plex Mono"
557 + font.pixelSize: 12
563 + Process {
564 + id: list
565 + stdout: StdioCollector {
566 + onStreamFinished: {
567 + root.entries = this.text.trim().length === 0 ? [] : this.text.trim().split("\n").map(line => {
568 + const tab = line.indexOf("\t")
569 + const encoded = tab >= 0 ? line.slice(0, tab) : line
570 + const raw = tab >= 0 ? line.slice(tab + 1) : line
571 + const compact = raw.replace(/\s+/g, " ")
572 + const preview = compact.length > 30 ? `${compact.slice(0, 27)}…` : compact
573 + return { "encoded": encoded, "preview": preview }
574 + })
579 +```
581 +- [ ] **Step 2: Add clipboard widget to `Bar.qml` left section before workspaces**
583 +```qml
584 + ClipboardWidget { theme: root.theme; commands: root.commands }
585 +```
587 +- [ ] **Step 3: Parse-check**
589 +Run:
591 +```bash
592 +dbus-run-session -- sh -lc 'cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml' >/tmp/nugu-qs-2c-clipboard.out 2>/tmp/nugu-qs-2c-clipboard.err; code=$?; printf 'exit=%s\n' "$code"; grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Syntax|Cannot|Binding loop|required|failed to create|ClipboardWidget|cliphist' /tmp/nugu-qs-2c-clipboard.out | sed -n '1,260p'
593 +```
595 +Expected: exit `124`, no QML errors.
597 +## Task 7: Add calendar popup
599 +**Files:**
601 +- Create: `quickshell/nugu/CalendarPopup.qml`
602 +- Modify: `quickshell/nugu/ClockWidget.qml`
604 +- [ ] **Step 1: Write `CalendarPopup.qml`**
606 +```qml
607 +import QtQuick
608 +import QtQuick.Layouts
609 +import Quickshell
611 +PanelWindow {
612 + id: root
614 + required property QtObject theme
615 + property date shownDate: new Date()
617 + anchors { top: true; horizontalCenter: true }
618 + margins { top: 36 }
619 + exclusiveZone: -1
620 + implicitWidth: 260
621 + implicitHeight: 220
622 + color: "transparent"
624 + readonly property date firstOfMonth: new Date(shownDate.getFullYear(), shownDate.getMonth(), 1)
625 + readonly property int firstDay: (firstOfMonth.getDay() + 6) % 7
626 + readonly property int daysInMonth: new Date(shownDate.getFullYear(), shownDate.getMonth() + 1, 0).getDate()
627 + readonly property int today: new Date().getDate()
628 + readonly property bool currentMonth: shownDate.getFullYear() === new Date().getFullYear() && shownDate.getMonth() === new Date().getMonth()
630 + Rectangle {
631 + anchors.fill: parent
632 + radius: 7
633 + color: `${root.theme.ui.backdrop}f2`
634 + border.width: 2
635 + border.color: root.theme.ui.accent
637 + ColumnLayout {
638 + anchors.fill: parent
639 + anchors.margins: 10
640 + spacing: 8
642 + Text {
643 + Layout.fillWidth: true
644 + text: Qt.formatDate(root.shownDate, "MMMM yyyy")
645 + color: root.theme.ui.important_global
646 + font.family: "IBM Plex Mono"
647 + font.pixelSize: 13
648 + font.bold: true
649 + horizontalAlignment: Text.AlignHCenter
652 + GridLayout {
653 + Layout.fillWidth: true
654 + columns: 7
655 + rowSpacing: 6
656 + columnSpacing: 6
658 + Repeater {
659 + model: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"]
660 + Text {
661 + required property string modelData
662 + text: modelData
663 + color: root.theme.ui.minor
664 + font.family: "IBM Plex Mono"
665 + font.pixelSize: 11
666 + horizontalAlignment: Text.AlignHCenter
667 + Layout.preferredWidth: 28
671 + Repeater {
672 + model: 42
673 + Rectangle {
674 + required property int index
675 + readonly property int day: index - root.firstDay + 1
676 + Layout.preferredWidth: 28
677 + Layout.preferredHeight: 22
678 + radius: 5
679 + color: root.currentMonth && day === root.today ? root.theme.ui.focus : "transparent"
681 + Text {
682 + anchors.centerIn: parent
683 + text: parent.day >= 1 && parent.day <= root.daysInMonth ? parent.day : ""
684 + color: parent.color !== "transparent" ? root.theme.content.backdrop : root.theme.ui.normal
685 + font.family: "IBM Plex Mono"
686 + font.pixelSize: 11
694 +```
696 +- [ ] **Step 2: Replace `ClockWidget.qml` with popup-enabled clock**
698 +```qml
699 +import QtQuick
700 +import Quickshell
701 +import "."
703 +Item {
704 + id: root
706 + required property QtObject theme
707 + property bool calendarVisible: false
709 + implicitWidth: button.implicitWidth
710 + implicitHeight: button.implicitHeight
712 + BarButton {
713 + id: button
714 + theme: root.theme
715 + text: Qt.formatTime(clock.date, "HH:mm")
716 + active: root.calendarVisible
717 + muted: false
718 + onActivated: root.calendarVisible = !root.calendarVisible
721 + CalendarPopup {
722 + visible: root.calendarVisible
723 + theme: root.theme
724 + shownDate: clock.date
727 + SystemClock {
728 + id: clock
729 + precision: SystemClock.Minutes
732 +```
734 +- [ ] **Step 3: Parse-check**
736 +Run:
738 +```bash
739 +dbus-run-session -- sh -lc 'cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml' >/tmp/nugu-qs-2c-calendar.out 2>/tmp/nugu-qs-2c-calendar.err; code=$?; printf 'exit=%s\n' "$code"; grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Syntax|Cannot|Binding loop|required|failed to create|CalendarPopup|ClockWidget' /tmp/nugu-qs-2c-calendar.out | sed -n '1,260p'
740 +```
742 +Expected: exit `124`, no QML errors.
744 +## Task 8: Add power popup
746 +**Files:**
748 +- Create: `quickshell/nugu/PowerWidget.qml`
749 +- Modify: `quickshell/nugu/Bar.qml`
751 +- [ ] **Step 1: Write `PowerWidget.qml`**
753 +```qml
754 +import QtQuick
755 +import QtQuick.Layouts
756 +import Quickshell.Io
757 +import "."
759 +Item {
760 + id: root
762 + required property QtObject theme
763 + required property QtObject commands
765 + property bool open: false
766 + property string uptime: ""
768 + implicitWidth: button.implicitWidth
769 + implicitHeight: button.implicitHeight
771 + function refresh(): void {
772 + up.exec(["sh", "-c", "uptime -p | cut -d ' ' -f2-"])
775 + StatusItem {
776 + id: button
777 + theme: root.theme
778 + text: "󰐥"
779 + minWidth: 24
780 + active: root.open
781 + onLeftClicked: {
782 + root.open = !root.open
783 + if (root.open) root.refresh()
787 + PanelWindow {
788 + visible: root.open
789 + anchors { top: true; right: true }
790 + margins { top: 36; right: 10 }
791 + exclusiveZone: -1
792 + implicitWidth: 260
793 + implicitHeight: 184
794 + color: "transparent"
796 + Rectangle {
797 + anchors.fill: parent
798 + radius: 7
799 + color: `${root.theme.ui.backdrop}f2`
800 + border.width: 2
801 + border.color: root.theme.ui.accent
803 + ColumnLayout {
804 + anchors.fill: parent
805 + anchors.margins: 10
806 + spacing: 8
808 + Text {
809 + Layout.fillWidth: true
810 + text: `up ${root.uptime}`
811 + color: root.theme.ui.important_global
812 + font.family: "IBM Plex Mono"
813 + font.pixelSize: 12
814 + horizontalAlignment: Text.AlignHCenter
817 + GridLayout {
818 + Layout.fillWidth: true
819 + columns: 2
820 + rowSpacing: 6
821 + columnSpacing: 6
823 + StatusItem { theme: root.theme; text: "󰌾 lock"; minWidth: 110; onLeftClicked: root.commands.lock() }
824 + StatusItem { theme: root.theme; text: "󰤄 sleep"; minWidth: 110; muted: true; onLeftClicked: root.commands.dryRunPower("sleep") }
825 + StatusItem { theme: root.theme; text: "󰍃 out"; minWidth: 110; muted: true; onLeftClicked: root.commands.dryRunPower("logout") }
826 + StatusItem { theme: root.theme; text: "󰜉 reboot"; minWidth: 110; critical: true; onLeftClicked: root.commands.dryRunPower("reboot") }
827 + StatusItem { theme: root.theme; text: "󰐥 off"; minWidth: 110; critical: true; onLeftClicked: root.commands.dryRunPower("poweroff") }
833 + Process {
834 + id: up
835 + stdout: StdioCollector { onStreamFinished: root.uptime = this.text.trim() }
838 +```
840 +- [ ] **Step 2: Add power widget to `Bar.qml` right section after battery**
842 +```qml
843 + PowerWidget { theme: root.theme; commands: root.commands }
844 +```
846 +- [ ] **Step 3: Parse-check**
848 +Run:
850 +```bash
851 +dbus-run-session -- sh -lc 'cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml' >/tmp/nugu-qs-2c-power.out 2>/tmp/nugu-qs-2c-power.err; code=$?; printf 'exit=%s\n' "$code"; grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Syntax|Cannot|Binding loop|required|failed to create|PowerWidget' /tmp/nugu-qs-2c-power.out | sed -n '1,260p'
852 +```
854 +Expected: exit `124`, no QML errors. No power action is executed by parse check.
856 +## Task 9: Finalize Phase 2C bar order
858 +**Files:**
860 +- Modify: `quickshell/nugu/Bar.qml`
862 +- [ ] **Step 1: Ensure left section order**
864 +The left `RowLayout` must have this order:
866 +```qml
867 + ClipboardWidget { theme: root.theme; commands: root.commands }
868 + WorkspaceWidget { theme: root.theme }
869 + BindModeWidget { theme: root.theme }
870 +```
872 +- [ ] **Step 2: Ensure center section order**
874 +The center `RowLayout` must have this order:
876 +```qml
877 + MediaWidget { theme: root.theme }
878 + ClockWidget { theme: root.theme }
879 +```
881 +- [ ] **Step 3: Ensure right section order**
883 +The right `RowLayout` must have this order:
885 +```qml
886 + TrayWidget { theme: root.theme; parentWindow: root }
887 + NotificationBridgeWidget { theme: root.theme; commands: root.commands }
888 + InhibitWidget {
889 + theme: root.theme
890 + onInhibitChanged: enabled => root.idleInhibited = enabled
892 + WifiWidget { theme: root.theme; commands: root.commands }
893 + BluetoothWidget { theme: root.theme; commands: root.commands }
894 + CpuWidget { theme: root.theme; commands: root.commands }
895 + VolumeWidget { theme: root.theme; commands: root.commands }
896 + BrightnessWidget { theme: root.theme }
897 + BatteryWidget { theme: root.theme; commands: root.commands }
898 + PowerWidget { theme: root.theme; commands: root.commands }
899 +```
901 +- [ ] **Step 4: Full parse-check**
903 +Run:
905 +```bash
906 +dbus-run-session -- sh -lc 'cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml' >/tmp/nugu-qs-2c-full.out 2>/tmp/nugu-qs-2c-full.err; code=$?; printf 'exit=%s\n' "$code"; grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Syntax|Cannot|Binding loop|required|failed to create' /tmp/nugu-qs-2c-full.out | sed -n '1,320p'
907 +```
909 +Expected: exit `124`, no QML parse/type errors.
911 +## Task 10: Live IPC and visual validation
913 +**Files:**
915 +- No tracked file changes unless validation finds a bug.
917 +- [ ] **Step 1: Start temporary named config**
919 +Run:
921 +```bash
922 +cd /home/oli/Workspace/dotfiles
923 +tmp="$(mktemp -d /tmp/nugu-qs-2c-xdg.XXXXXX)"
924 +mkdir -p "$tmp/quickshell"
925 +ln -s "$PWD/quickshell/nugu" "$tmp/quickshell/nugu"
926 +printf '%s\n' "$tmp" >/tmp/nugu-qs-2c-ipc.xdg
927 +XDG_CONFIG_HOME="$tmp" QS_NO_RELOAD_POPUP=1 qs -c nugu >/tmp/nugu-qs-2c-ipc.out 2>/tmp/nugu-qs-2c-ipc.err &
928 +printf '%s\n' $! >/tmp/nugu-qs-2c-ipc.pid
929 +sleep 3
930 +grep -E 'ERROR|WARN|Configuration Loaded|TypeError|ReferenceError|Binding loop|required|failed to create' /tmp/nugu-qs-2c-ipc.out | sed -n '1,220p'
931 +```
933 +Expected: no QML parse/type errors. This does not mutate `~/.config/quickshell`.
935 +- [ ] **Step 2: Show dark and light bar screenshots**
937 +Run:
939 +```bash
940 +XDG_CONFIG_HOME="$(cat /tmp/nugu-qs-2c-ipc.xdg)" qs ipc -c nugu call nugu showBar
941 +sleep 4
942 +grim -g '0,0 1366x90' /tmp/nugu-qs-2c-bar-dark.png
943 +XDG_CONFIG_HOME="$(cat /tmp/nugu-qs-2c-ipc.xdg)" qs ipc -c nugu call nugu setThemeMode light
944 +sleep 1
945 +grim -g '0,0 1366x90' /tmp/nugu-qs-2c-bar-light.png
946 +XDG_CONFIG_HOME="$(cat /tmp/nugu-qs-2c-ipc.xdg)" qs ipc -c nugu call nugu setThemeMode dark
947 +```
949 +Expected: Quickshell bar is visible under Ironbar; dark/light colors are readable.
951 +- [ ] **Step 3: Validate notification bridge**
953 +Run:
955 +```bash
956 +notify-send 'Nugu Phase 2C test' 'notification bridge count test'
957 +sleep 6
958 +grim -g '1000,20 180x55' /tmp/nugu-qs-2c-notification-count.png
959 +makoctl dismiss --all
960 +```
962 +Expected: notification widget shows nonzero count before dismiss and returns to empty after poll. Mako remains the daemon.
964 +- [ ] **Step 4: Validate clipboard popup non-destructively**
966 +Click the clipboard icon or use pointer automation. Expected: popup opens with up to 5 `cliphist` rows, truncated to about 30 characters. Do not clear history.
968 +- [ ] **Step 5: Validate inhibit state**
970 +Click inhibit widget. Expected: icon changes between `󰛊 inf` and `󰅶 inf`; right-click cycles `30m`, `1h`, `2h`, `inf`. Do not change `hypridle.conf`.
972 +- [ ] **Step 6: Validate calendar and power popup**
974 +Click clock. Expected: readable month calendar popup.
976 +Click power. Expected: popup opens with uptime and action labels. Only lock is a live action; sleep/logout/reboot/poweroff record dry-run state and must not execute.
978 +- [ ] **Step 7: Stop temporary Quickshell**
980 +Run:
982 +```bash
983 +XDG_CONFIG_HOME="$(cat /tmp/nugu-qs-2c-ipc.xdg)" qs ipc -c nugu call nugu hideBar
984 +kill "$(cat /tmp/nugu-qs-2c-ipc.pid)"
985 +rm -rf "$(cat /tmp/nugu-qs-2c-ipc.xdg)"
986 +rm -f /tmp/nugu-qs-2c-ipc.pid /tmp/nugu-qs-2c-ipc.xdg
987 +pgrep -a qs || true
988 +```
990 +Expected: no temporary `qs` process remains.
992 +## Task 11: README and verification record
994 +**Files:**
996 +- Modify: `quickshell/nugu/README.md`
997 +- Create: `docs/super/inventory/2026-06-17-quickshell-phase-2c-verification.md`
999 +- [ ] **Step 1: Append README section**
1001 +Append:
1003 +```markdown
1005 +## Phase 2C bar surfaces
1007 +Phase 2C adds the remaining Ironbar bar surfaces while Ironbar/Mako stay live:
1009 +- system tray display/menu forwarding
1010 +- clipboard entry popup backed by `cliphist`
1011 +- hidden bind-mode widget for future Hypr submaps
1012 +- Mako notification count/restore/dismiss bridge
1013 +- idle inhibit display/toggle/duration cycle
1014 +- power popup with lock live and destructive actions gated
1015 +- clock calendar popup
1017 +Still deferred: native notification daemon, launcher bind replacement, full clipboard picker bind replacement, OSDs, Hypr bind migration, and retiring old services.
1018 +```
1020 +- [ ] **Step 2: Write verification record**
1022 +Create `docs/super/inventory/2026-06-17-quickshell-phase-2c-verification.md` with:
1024 +```markdown
1025 +# Quickshell Phase 2C Verification — 2026-06-17
1027 +## Commands
1029 +- `dbus-run-session -- timeout 3s qs -p quickshell/nugu/shell.qml`
1030 +- temporary `XDG_CONFIG_HOME` named config with `qs -c nugu`
1031 +- `qs ipc -c nugu call nugu showBar`
1032 +- `qs ipc -c nugu call nugu setThemeMode light`
1033 +- `notify-send 'Nugu Phase 2C test' 'notification bridge count test'`
1034 +- `makoctl dismiss --all`
1036 +## Parse validation
1038 +Record final parse result here from `/tmp/nugu-qs-2c-full.out`.
1040 +## Visual validation
1042 +Record screenshots:
1044 +- `/tmp/nugu-qs-2c-bar-dark.png`
1045 +- `/tmp/nugu-qs-2c-bar-light.png`
1046 +- `/tmp/nugu-qs-2c-notification-count.png`
1048 +## Manual observations
1050 +- Tray behavior: recorded during execution.
1051 +- Clipboard popup: recorded during execution.
1052 +- Bind mode hidden because current Hypr config has no submaps: recorded during execution.
1053 +- Notification bridge count/restore/dismiss: recorded during execution.
1054 +- Inhibit toggle/cycle: recorded during execution.
1055 +- Calendar popup: recorded during execution.
1056 +- Power popup dry-run gating: recorded during execution.
1057 +- Ironbar and Mako remained live and were not retired.
1059 +## Known gaps
1061 +Record any failed or skipped rows here. Do not mark Phase 2C accepted if required rows are still unverified.
1062 +```
1064 +- [ ] **Step 3: Confirm old services still run**
1066 +Run:
1068 +```bash
1069 +systemctl --user --no-pager --plain is-active ironbar.service ironbar-workspaces.service mako.service
1070 +```
1072 +Expected: all three are active.
1074 +## Task 12: Commit Phase 2C
1076 +**Files:**
1078 +- Add/modify all files from prior tasks.
1080 +- [ ] **Step 1: Check focused status**
1082 +Run:
1084 +```bash
1085 +cd /home/oli/Workspace/dotfiles
1086 +git diff --name-only -- quickshell/nugu docs/super/inventory docs/super/plans | sed -n '1,160p'
1087 +git diff --cached --name-only | sed -n '1,80p'
1088 +```
1090 +Expected: only intended Phase 2C files plus this plan and verification.
1092 +- [ ] **Step 2: Commit**
1094 +Run:
1096 +```bash
1097 +git add docs/super/plans/2026-06-17-quickshell-hypr-companions-phase-2c-bar-surfaces.md docs/super/inventory/2026-06-17-quickshell-phase-2c-verification.md quickshell/nugu/Commands.qml quickshell/nugu/TrayWidget.qml quickshell/nugu/ClipboardWidget.qml quickshell/nugu/BindModeWidget.qml quickshell/nugu/NotificationBridgeWidget.qml quickshell/nugu/InhibitWidget.qml quickshell/nugu/PowerWidget.qml quickshell/nugu/CalendarPopup.qml quickshell/nugu/ClockWidget.qml quickshell/nugu/Bar.qml quickshell/nugu/README.md
1098 +git commit -m "feat(quickshell): add remaining bar surfaces"
1099 +```
1101 +## Task 13: Phase boundary check
1103 +**Files:**
1105 +- No tracked changes unless verification found a bug.
1107 +- [ ] **Step 1: Non-mutating final checks**
1109 +Run:
1111 +```bash
1112 +hyprctl configerrors
1113 +systemctl --user --no-pager --plain is-active ironbar.service ironbar-workspaces.service mako.service
1114 +systemctl --user --no-pager --plain is-active quickshell.service || true
1115 +pgrep -a qs || true
1116 +```
1118 +Expected:
1120 +- `hyprctl configerrors` empty.
1121 +- Ironbar and Mako active.
1122 +- Quickshell service not live unless explicitly started by the user.
1123 +- No stray temporary `qs -c nugu` process.
1125 +- [ ] **Step 2: Report next phase**
1127 +Report:
1129 +```text
1130 +Phase 2C completes remaining bar-surface implementation but does not retire Ironbar/Mako. Next roadmap phase: native Quickshell notification daemon replacing Mako, with controlled Mako stop/restart tests.
1131 +```
1133 +Do not start Phase 3 in the same execution pass.

quickshell/nugu/Bar.qml

Modified
1 1 import QtQuick
2 2 import QtQuick.Layouts
3 3 import Quickshell
4 +import Quickshell.Wayland
4 5 import "."
6 7 PanelWindow {
9 10 required property QtObject theme
10 11 required property QtObject commands
11 12 property bool shown: false
13 + property bool idleInhibited: false
13 - // Keep the Phase 2A bar opt-in. A visible property instead of destroying the
14 - // panel gives reliable IPC toggles without service restarts.
15 + // Keep the bar opt-in until all parity rows pass and Ironbar can be retired.
15 16 visible: shown
16 17 anchors { top: true; left: true; right: true }
17 18 implicitHeight: 30
18 19 color: "transparent"
21 + IdleInhibitor {
22 + // Attach inhibition to the real bar window; no hypridle.conf mutation needed.
23 + window: root
24 + enabled: root.idleInhibited
25 + }
20 27 // Match the Nugu/Ironbar visual language: translucent semantic backdrop plus
21 28 // a hard accent line. This keeps screenshots comparable during parity checks.
22 29 Rectangle {
40 47 anchors.bottomMargin: 2
41 48 spacing: 8
43 - // Left and right zones reserve the future Ironbar parity layout now, so
44 - // adding Phase 2B widgets will not move workspaces/clock unexpectedly.
45 50 RowLayout {
46 51 Layout.fillWidth: true
47 52 Layout.alignment: Qt.AlignVCenter
48 53 spacing: 10
55 + ClipboardWidget { theme: root.theme; commands: root.commands; barWindow: root }
50 56 WorkspaceWidget { theme: root.theme }
57 + BindModeWidget { theme: root.theme }
53 60 RowLayout {
55 62 spacing: 8
57 64 MediaWidget { theme: root.theme }
58 - ClockWidget { theme: root.theme }
65 + ClockWidget { theme: root.theme; barWindow: root }
61 68 RowLayout {
63 70 Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
64 71 spacing: 8
73 + TrayWidget { theme: root.theme; parentWindow: root }
74 + NotificationBridgeWidget { theme: root.theme; commands: root.commands }
75 + InhibitWidget {
76 + theme: root.theme
77 + onInhibitChanged: enabled => root.idleInhibited = enabled
78 + }
66 79 WifiWidget { theme: root.theme; commands: root.commands }
67 80 BluetoothWidget { theme: root.theme; commands: root.commands }
68 81 CpuWidget { theme: root.theme; commands: root.commands }
69 82 VolumeWidget { theme: root.theme; commands: root.commands }
70 83 BrightnessWidget { theme: root.theme }
71 84 BatteryWidget { theme: root.theme; commands: root.commands }
85 + PowerWidget { theme: root.theme; commands: root.commands; barWindow: root }

quickshell/nugu/BindModeWidget.qml

Added
new file mode 100644
1 +import QtQuick
2 +import Quickshell.Hyprland
3 +import "."
5 +StatusItem {
6 + id: root
8 + property string mode: ""
10 + text: mode.length > 0 ? `󰌌 ${mode}` : ""
11 + active: mode.length > 0
12 + minWidth: 60
14 + // Current Hypr Lua config has no submaps, so parity is hidden state. Listening
15 + // now preserves future bind-mode behavior without adding Hypr config.
16 + Connections {
17 + target: Hyprland
18 + function onRawEvent(event) {
19 + if (event.name !== "submap") return
20 + const parsed = event.parse(1)
21 + root.mode = parsed.length > 0 ? parsed[0] : ""
22 + }
23 + }

quickshell/nugu/CalendarPopup.qml

Added
new file mode 100644
1 +import QtQuick
2 +import QtQuick.Layouts
3 +import Quickshell
5 +PopupWindow {
6 + id: root
8 + required property QtObject theme
9 + required property var barWindow
10 + required property var anchorItem
11 + property date shownDate: new Date()
13 + visible: false
14 + implicitWidth: 260
15 + implicitHeight: 220
16 + color: "transparent"
18 + anchor {
19 + window: root.barWindow
20 + item: root.anchorItem
21 + gravity: Edges.Bottom
22 + adjustment: PopupAdjustment.Slide
23 + }
25 + readonly property date firstOfMonth: new Date(shownDate.getFullYear(), shownDate.getMonth(), 1)
26 + readonly property int firstDay: (firstOfMonth.getDay() + 6) % 7
27 + readonly property int daysInMonth: new Date(shownDate.getFullYear(), shownDate.getMonth() + 1, 0).getDate()
28 + readonly property int today: new Date().getDate()
29 + readonly property bool currentMonth: shownDate.getFullYear() === new Date().getFullYear() && shownDate.getMonth() === new Date().getMonth()
31 + Rectangle {
32 + anchors.fill: parent
33 + radius: 7
34 + color: root.theme.ui.backdrop
35 + border.width: 2
36 + border.color: root.theme.ui.accent
38 + ColumnLayout {
39 + anchors.fill: parent
40 + anchors.margins: 10
41 + spacing: 8
43 + Text {
44 + Layout.fillWidth: true
45 + text: Qt.formatDate(root.shownDate, "MMMM yyyy")
46 + color: root.theme.ui.important_global
47 + font.family: "IBM Plex Mono"
48 + font.pixelSize: 13
49 + font.bold: true
50 + horizontalAlignment: Text.AlignHCenter
51 + }
53 + GridLayout {
54 + Layout.alignment: Qt.AlignHCenter
55 + columns: 7
56 + rowSpacing: 6
57 + columnSpacing: 6
59 + Repeater {
60 + model: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"]
61 + Text {
62 + required property string modelData
63 + text: modelData
64 + color: root.theme.ui.minor
65 + font.family: "IBM Plex Mono"
66 + font.pixelSize: 11
67 + horizontalAlignment: Text.AlignHCenter
68 + Layout.preferredWidth: 28
69 + }
70 + }
72 + Repeater {
73 + model: 42
74 + Rectangle {
75 + id: dayCell
76 + required property int index
77 + readonly property int day: index - root.firstDay + 1
78 + readonly property bool highlighted: root.currentMonth && day === root.today
79 + Layout.preferredWidth: 28
80 + Layout.preferredHeight: 22
81 + radius: 5
82 + color: highlighted ? root.theme.ui.focus : "transparent"
84 + Text {
85 + anchors.centerIn: parent
86 + text: dayCell.day >= 1 && dayCell.day <= root.daysInMonth ? dayCell.day : ""
87 + color: dayCell.highlighted ? root.theme.content.backdrop : root.theme.ui.normal
88 + font.family: "IBM Plex Mono"
89 + font.pixelSize: 11
90 + }
91 + }
92 + }
93 + }
94 + }
95 + }

quickshell/nugu/ClipboardWidget.qml

Added
new file mode 100644
1 +import QtQuick
2 +import QtQuick.Layouts
3 +import Quickshell
4 +import Quickshell.Io
5 +import "."
7 +Item {
8 + id: root
10 + required property QtObject theme
11 + required property QtObject commands
12 + required property var barWindow
14 + property bool open: false
15 + property var entries: []
17 + implicitWidth: button.implicitWidth
18 + implicitHeight: button.implicitHeight
20 + function refresh(): void {
21 + list.exec(["sh", "-c", "cliphist list | head -n 5"])
22 + }
24 + StatusItem {
25 + id: button
26 + theme: root.theme
27 + text: "󰅌"
28 + minWidth: 24
29 + active: root.open
30 + onLeftClicked: {
31 + root.open = !root.open
32 + if (root.open) root.refresh()
33 + }
34 + onMiddleClicked: {
35 + root.open = !root.open
36 + if (root.open) root.refresh()
37 + }
38 + }
40 + PopupWindow {
41 + visible: root.open
42 + implicitWidth: 380
43 + implicitHeight: Math.max(56, entries.length * 32 + 18)
44 + color: "transparent"
46 + anchor {
47 + window: root.barWindow
48 + item: button
49 + gravity: Edges.Bottom
50 + adjustment: PopupAdjustment.Slide
51 + }
53 + Rectangle {
54 + anchors.fill: parent
55 + radius: 7
56 + color: root.theme.ui.backdrop
57 + border.width: 2
58 + border.color: root.theme.ui.accent
60 + ColumnLayout {
61 + anchors.fill: parent
62 + anchors.margins: 8
63 + spacing: 4
65 + Repeater {
66 + model: root.entries
68 + Rectangle {
69 + required property var modelData
70 + Layout.fillWidth: true
71 + Layout.preferredHeight: 28
72 + radius: 6
73 + color: mouse.containsMouse ? root.theme.ui.accent : "transparent"
74 + clip: true
76 + Text {
77 + anchors.left: parent.left
78 + anchors.right: parent.right
79 + anchors.verticalCenter: parent.verticalCenter
80 + anchors.leftMargin: 8
81 + anchors.rightMargin: 8
82 + text: parent.modelData.preview
83 + color: mouse.containsMouse ? root.theme.content.backdrop : root.theme.ui.normal
84 + font.family: "IBM Plex Mono"
85 + font.pixelSize: 12
86 + elide: Text.ElideRight
87 + maximumLineCount: 1
88 + }
90 + MouseArea {
91 + id: mouse
92 + anchors.fill: parent
93 + hoverEnabled: true
94 + onClicked: {
95 + root.commands.copyClipboardEntry(parent.modelData.encoded, parent.modelData.preview)
96 + root.open = false
97 + }
98 + }
99 + }
102 + Text {
103 + visible: root.entries.length === 0
104 + text: "clipboard empty"
105 + color: root.theme.ui.minor
106 + font.family: "IBM Plex Mono"
107 + font.pixelSize: 12
113 + Process {
114 + id: list
115 + stdout: StdioCollector {
116 + onStreamFinished: {
117 + root.entries = this.text.trim().length === 0 ? [] : this.text.trim().split("\n").map(line => {
118 + const tab = line.indexOf("\t")
119 + const encoded = tab >= 0 ? line.slice(0, tab) : line
120 + const raw = tab >= 0 ? line.slice(tab + 1) : line
121 + const compact = raw.replace(/\s+/g, " ")
122 + const preview = compact.length > 30 ? `${compact.slice(0, 27)}…` : compact
123 + return { "encoded": encoded, "preview": preview }
124 + })

quickshell/nugu/ClockWidget.qml

Modified
2 2 import QtQuick
3 3 import Quickshell
4 4 import "."
6 -BarButton {
6 +Item {
7 7 id: root
9 - // Match Ironbar's compact HH:mm clock first; calendar popovers belong in a
10 - // later parity phase after the bar shell is stable.
11 - text: Qt.formatTime(clock.date, "HH:mm")
12 - active: false
13 - muted: false
9 + required property QtObject theme
10 + required property var barWindow
11 + property bool calendarVisible: false
13 + implicitWidth: button.implicitWidth
14 + implicitHeight: button.implicitHeight
16 + BarButton {
17 + id: button
18 + theme: root.theme
19 + // Preserve Ironbar's compact HH:mm text; the richer calendar is opt-in on click.
20 + text: Qt.formatTime(clock.date, "HH:mm")
21 + active: root.calendarVisible
22 + muted: false
23 + onActivated: root.calendarVisible = !root.calendarVisible
24 + }
26 + CalendarPopup {
27 + visible: root.calendarVisible
28 + theme: root.theme
29 + barWindow: root.barWindow
30 + anchorItem: button
31 + shownDate: clock.date
32 + }
15 34 SystemClock {
16 35 id: clock

quickshell/nugu/Commands.qml

Modified
5 5 id: root
6 6 visible: false
8 - // Keep all external process launches behind one object so status widgets stay
9 - // declarative and future Hypr bind migration has one command boundary to audit.
8 + // Keep all external process launches behind one object so widgets stay
9 + // declarative and future Hypr bind migration has one command boundary.
10 10 property string sessionSlice: "session-graphical.slice"
11 11 property string workSlice: "work.slice"
12 + property string lastClipboardPreview: ""
13 + property bool lastClipboardCopied: false
14 + property string lastPowerAction: ""
13 16 function detached(args: var): void {
14 17 runner.command = args
41 + function restoreNotification(): void {
42 + detached(["makoctl", "restore"])
43 + }
45 + function dismissNotifications(): void {
46 + detached(["makoctl", "dismiss", "--all"])
47 + }
49 + function copyClipboardEntry(encoded: string, preview: string): void {
50 + lastClipboardPreview = preview
51 + clipboardCopy.command = ["sh", "-c", "printf '%s\\n' \"$1\" | cliphist decode | wl-copy", "sh", encoded]
52 + clipboardCopy.running = true
53 + }
55 + function lock(): void {
56 + lastPowerAction = "lock"
57 + detached(["hyprlock"])
58 + }
60 + function dryRunPower(action: string): void {
61 + // Phase 2C must not power off, reboot, logout, or suspend during tests.
62 + // Later phases can replace this with a confirmed execution path.
63 + lastPowerAction = `dry-run ${action}`
64 + }
38 66 Process { id: runner }
68 + Process {
69 + id: clipboardCopy
70 + onExited: (exitCode, exitStatus) => { root.lastClipboardCopied = exitCode === 0 }
71 + }

quickshell/nugu/InhibitWidget.qml

Added
new file mode 100644
1 +import QtQuick
2 +import "."
4 +StatusItem {
5 + id: root
7 + property bool inhibiting: false
8 + property int durationIndex: 3
9 + readonly property var durations: [
10 + { "label": "30m", "milliseconds": 30 * 60 * 1000 },
11 + { "label": "1h", "milliseconds": 60 * 60 * 1000 },
12 + { "label": "2h", "milliseconds": 2 * 60 * 60 * 1000 },
13 + { "label": "inf", "milliseconds": 0 }
14 + ]
15 + readonly property var duration: durations[durationIndex]
17 + text: `${inhibiting ? "󰅶" : "󰛊"} ${duration.label}`
18 + active: inhibiting
19 + minWidth: 58
21 + signal inhibitChanged(bool enabled)
23 + onLeftClicked: {
24 + inhibiting = !inhibiting
25 + inhibitChanged(inhibiting)
26 + expiry.restart()
27 + }
29 + onRightClicked: {
30 + durationIndex = (durationIndex + 1) % durations.length
31 + if (inhibiting) expiry.restart()
32 + }
34 + Timer {
35 + id: expiry
36 + interval: root.duration.milliseconds
37 + repeat: false
38 + running: root.inhibiting && root.duration.milliseconds > 0
39 + onTriggered: {
40 + root.inhibiting = false
41 + root.inhibitChanged(false)
42 + }
43 + }

quickshell/nugu/NotificationBridgeWidget.qml

Added
new file mode 100644
1 +import QtQuick
2 +import Quickshell.Io
3 +import "."
5 +StatusItem {
6 + id: root
8 + required property QtObject commands
10 + property int count: 0
12 + text: count > 0 ? `󰂞 ${count}` : "󰂚"
13 + active: count > 0
14 + minWidth: count > 0 ? 42 : 24
16 + // Mako remains the notification daemon in Phase 2C. Polling is temporary and
17 + // intentionally isolated so Phase 3 can swap in native notification state.
18 + onLeftClicked: commands.restoreNotification()
19 + onRightClicked: commands.dismissNotifications()
21 + Timer {
22 + running: true
23 + repeat: true
24 + interval: 5000
25 + triggeredOnStart: true
26 + onTriggered: poll.exec(["sh", "-c", "makoctl list 2>/dev/null | grep -c '^Notification '"])
27 + }
29 + Process {
30 + id: poll
31 + stdout: StdioCollector {
32 + onStreamFinished: root.count = parseInt(this.text.trim() || "0", 10)
33 + }
34 + }

quickshell/nugu/PowerWidget.qml

Added
new file mode 100644
1 +import QtQuick
2 +import QtQuick.Layouts
3 +import Quickshell
4 +import Quickshell.Io
5 +import "."
7 +Item {
8 + id: root
10 + required property QtObject theme
11 + required property QtObject commands
12 + required property var barWindow
14 + property bool open: false
15 + property string uptime: ""
17 + implicitWidth: button.implicitWidth
18 + implicitHeight: button.implicitHeight
20 + function refresh(): void {
21 + up.exec(["sh", "-c", "uptime -p | cut -d ' ' -f2-"])
22 + }
24 + StatusItem {
25 + id: button
26 + theme: root.theme
27 + text: "󰐥"
28 + minWidth: 24
29 + active: root.open
30 + onLeftClicked: {
31 + root.open = !root.open
32 + if (root.open) root.refresh()
33 + }
34 + }
36 + PopupWindow {
37 + visible: root.open
38 + implicitWidth: 260
39 + implicitHeight: 184
40 + color: "transparent"
42 + anchor {
43 + window: root.barWindow
44 + item: button
45 + gravity: Edges.Bottom
46 + adjustment: PopupAdjustment.Slide
47 + }
49 + Rectangle {
50 + anchors.fill: parent
51 + radius: 7
52 + color: root.theme.ui.backdrop
53 + border.width: 2
54 + border.color: root.theme.ui.accent
56 + ColumnLayout {
57 + anchors.fill: parent
58 + anchors.margins: 10
59 + spacing: 8
61 + Text {
62 + Layout.fillWidth: true
63 + text: `up ${root.uptime}`
64 + color: root.theme.ui.important_global
65 + font.family: "IBM Plex Mono"
66 + font.pixelSize: 12
67 + horizontalAlignment: Text.AlignHCenter
68 + }
70 + GridLayout {
71 + Layout.fillWidth: true
72 + columns: 2
73 + rowSpacing: 6
74 + columnSpacing: 6
76 + // Only lock is live in Phase 2C. Destructive/session actions are
77 + // deliberately dry-run until a later confirmed power replacement.
78 + StatusItem { theme: root.theme; text: "󰌾 lock"; minWidth: 110; onLeftClicked: root.commands.lock() }
79 + StatusItem { theme: root.theme; text: "󰤄 sleep"; minWidth: 110; muted: true; onLeftClicked: root.commands.dryRunPower("sleep") }
80 + StatusItem { theme: root.theme; text: "󰍃 out"; minWidth: 110; muted: true; onLeftClicked: root.commands.dryRunPower("logout") }
81 + StatusItem { theme: root.theme; text: "󰜉 reboot"; minWidth: 110; critical: true; onLeftClicked: root.commands.dryRunPower("reboot") }
82 + StatusItem { theme: root.theme; text: "󰐥 off"; minWidth: 110; critical: true; onLeftClicked: root.commands.dryRunPower("poweroff") }
83 + }
84 + }
85 + }
86 + }
88 + Process {
89 + id: up
90 + stdout: StdioCollector { onStreamFinished: root.uptime = this.text.trim() }
91 + }

quickshell/nugu/README.md

Modified
54 54 - UPower battery percent
56 56 Still deferred to Phase 2C: tray, clipboard entry point, bind mode, notification bridge, inhibit, power popup, calendar popup, full visual comparison.
58 +## Phase 2C bar surfaces
60 +Phase 2C adds the remaining Ironbar bar surfaces while Ironbar/Mako stay live:
62 +- system tray display/menu forwarding
63 +- clipboard entry popup backed by `cliphist`
64 +- hidden bind-mode widget for future Hypr submaps
65 +- Mako notification count/restore/dismiss bridge
66 +- idle inhibit display/toggle/duration cycle
67 +- power popup with lock live and destructive actions gated
68 +- clock calendar popup
70 +Still deferred: native notification daemon, launcher bind replacement, full clipboard picker bind replacement, OSDs, Hypr bind migration, and retiring old services.

quickshell/nugu/TrayWidget.qml

Added
new file mode 100644
1 +import QtQuick
2 +import QtQuick.Layouts
3 +import Quickshell.Services.SystemTray
4 +import Quickshell.Widgets
6 +RowLayout {
7 + id: root
9 + required property QtObject theme
10 + required property var parentWindow
12 + spacing: 4
13 + visible: SystemTray.items.values.length > 0
15 + // Phase 2C uses native tray item activation/menu forwarding. Custom DBusMenu
16 + // rendering can wait until a concrete tray app proves native menus insufficient.
17 + Repeater {
18 + model: SystemTray.items
20 + Item {
21 + id: itemRoot
22 + required property var modelData
24 + Layout.preferredWidth: 22
25 + Layout.preferredHeight: 22
27 + Rectangle {
28 + anchors.fill: parent
29 + radius: 7
30 + color: mouse.containsMouse ? root.theme.ui.accent : "transparent"
31 + }
33 + IconImage {
34 + anchors.centerIn: parent
35 + implicitSize: 14
36 + source: modelData.icon
37 + }
39 + MouseArea {
40 + id: mouse
41 + anchors.fill: parent
42 + hoverEnabled: true
43 + acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
44 + onClicked: event => {
45 + if (event.button === Qt.RightButton || modelData.onlyMenu) {
46 + modelData.display(root.parentWindow, itemRoot.x, itemRoot.y + itemRoot.height)
47 + } else if (event.button === Qt.MiddleButton) {
48 + modelData.secondaryActivate()
49 + } else {
50 + modelData.activate()
51 + }
52 + }
53 + onWheel: event => modelData.scroll(event.angleDelta.y, false)
54 + }
55 + }
56 + }