repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

feat(quickshell): add nugu bar shell

539cdbdbf457d60225f8b7cbe728f18613d63f2b

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (16)

docs/super/inventory/2026-06-17-quickshell-parity-checklist.md

Modified
40 40 | --- | --- | --- |
41 41 | Direct parse/start | `timeout 3s qs -p quickshell/nugu/shell.qml` | Exit `124`; stderr has no QML parse/type errors. |
42 42 | Service syntax | `systemd-analyze --user verify hypr/systemd/quickshell.service` | Exit `0`, no output. |
43 -| Named config IPC | `qs -c nugu ipc call nugu showDiagnostics` | Diagnostics panel appears without replacing Ironbar/Mako. |
44 -| Theme light | `qs -c nugu ipc call nugu setThemeMode light` | Diagnostics colors switch to light Nugu palette. |
45 -| Theme dark | `qs -c nugu ipc call nugu setThemeMode dark` | Diagnostics colors switch to dark Nugu palette. |
46 -| Hide diagnostics | `qs -c nugu ipc call nugu hideDiagnostics` | Diagnostics panel disappears. |
43 +| Named config IPC | `qs ipc -c nugu call nugu showDiagnostics` | Diagnostics panel appears without replacing Ironbar/Mako. |
44 +| Theme light | `qs ipc -c nugu call nugu setThemeMode light` | Diagnostics colors switch to light Nugu palette. |
45 +| Theme dark | `qs ipc -c nugu call nugu setThemeMode dark` | Diagnostics colors switch to dark Nugu palette. |
46 +| Hide diagnostics | `qs ipc -c nugu call nugu hideDiagnostics` | Diagnostics panel disappears. |
47 47 | Old services untouched | `systemctl --user is-active ironbar.service mako.service` | Both still active unless user explicitly approved otherwise. |
49 49 ## Bar parity acceptance
238 238 | Error regex | Summary contains `Error`/`Failed`/`Crash`. | Error color/border. |
239 239 | Warning regex | Summary contains `Warn`/`Warning`. | Warning color/border. |
240 240 | Info regex | Summary contains `Info`/`Notice`. | Info color/border. |
241 -| Restore IPC | Call `qs -c nugu ipc call nugu restoreNotification`. | Last/history notification restored. |
242 -| Dismiss IPC | Call `qs -c nugu ipc call nugu dismissNotifications`. | Visible notifications dismissed. |
241 +| Restore IPC | Call `qs ipc -c nugu call nugu restoreNotification`. | Last/history notification restored. |
242 +| Dismiss IPC | Call `qs ipc -c nugu call nugu dismissNotifications`. | Visible notifications dismissed. |
244 244 ## Launcher/clipboard/power/OSD parity acceptance

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

Modified
5 5 - `dbus-run-session -- sh -lc "cd /home/oli/Workspace/dotfiles && timeout 3s qs -p quickshell/nugu/shell.qml"`
6 6 - `systemd-analyze --user verify hypr/systemd/quickshell.service`
7 7 - temporary `XDG_CONFIG_HOME` named config with `qs -c nugu`
8 -- `qs -c nugu ipc call nugu showDiagnostics`
9 -- `qs -c nugu ipc call nugu setThemeMode light`
10 -- `qs -c nugu ipc call nugu setThemeMode dark`
11 -- `qs -c nugu ipc call nugu hideDiagnostics`
8 +- `qs ipc -c nugu call nugu showDiagnostics`
9 +- `qs ipc -c nugu call nugu setThemeMode light`
10 +- `qs ipc -c nugu call nugu setThemeMode dark`
11 +- `qs ipc -c nugu call nugu hideDiagnostics`
12 12 - `grim -g "0,0 430x170" /tmp/nugu-qs-phase1-diagnostics.png`
14 14 ## Results
77 77 - Mako remained active.
78 78 - Quickshell service was created in the repo but not linked/enabled live.
79 79 - Temporary Quickshell processes were stopped; `pgrep -a qs` was empty after tests.
81 +## IPC syntax correction recheck
83 +During Phase 2A, the correct CLI shape was confirmed as `qs ipc -c nugu call ...`; `qs -c nugu ipc call ...` can launch a config instead of selecting the IPC subcommand. This record has been corrected to show the valid command shape.
85 +Recheck with temporary `XDG_CONFIG_HOME` passed:
87 +```text
88 +showDiagnostics: ok
89 +setThemeMode light: returned light
90 +setThemeMode dark: returned dark
91 +hideDiagnostics: ok
92 +pgrep -a qs: empty after cleanup
93 +```

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

Added
new file mode 100644
1 +# Quickshell Phase 2A Verification — 2026-06-17
3 +## Scope
5 +Phase 2A implemented the hidden Quickshell bar shell, workspace buttons, and HH:mm clock. Ironbar/Mako remain live; no retirement happened.
7 +## Commands
9 +- `dbus-run-session -- timeout 3s qs -p quickshell/nugu/shell.qml`
10 +- `qs ipc -c nugu call nugu showBar`
11 +- `qs ipc -c nugu call nugu setThemeMode light`
12 +- `qs ipc -c nugu call nugu setThemeMode dark`
13 +- `qs ipc -c nugu call nugu hideBar`
14 +- automated `wdotool --backend wlr-protocols` clicks on workspaces `1`, `2`, `3`, `4`, `5`, `9`
15 +- `systemctl --user --no-pager --plain is-active ironbar.service ironbar-workspaces.service mako.service`
17 +## Parse validation
19 +`qs -p quickshell/nugu/shell.qml` under `dbus-run-session` exited `124` via timeout and printed `Configuration Loaded`.
21 +Relevant output:
23 +```text
24 +INFO: Configuration Loaded
25 +```
27 +No QML parse/type errors, no missing component errors, no `SystemClock.Minutes` errors, no `Hyprland.workspaces.values` errors.
29 +## IPC validation
31 +The correct Quickshell IPC syntax is:
33 +```sh
34 +qs ipc -c nugu call nugu <function>
35 +```
37 +The earlier `qs -c nugu ipc call ...` form launches a config instead of selecting the IPC subcommand and was corrected in docs/config comments.
39 +Mode IPC returned the expected values:
41 +```text
42 +theme-initial=dark
43 +theme-light=light
44 +theme-dark=dark
45 +```
47 +Screenshots captured:
49 +- `/tmp/nugu-qs-2a-bar-dark.png`
50 +- `/tmp/nugu-qs-2a-bar-light.png`
52 +Visual check confirmed:
54 +- dark bar visible below/near Ironbar with workspaces `1`, `2`, `3`, `4`, `5`, `9`
55 +- light bar switched to light Nugu palette and remained readable
56 +- active workspace highlight visible
57 +- clock displayed `HH:mm`
58 +- Ironbar remained visible during overlap testing
60 +## Workspace click validation
62 +Automated click test output:
64 +```text
65 +original=3 cursor=487,659
66 +clicked=1 active=1
67 +clicked=2 active=2
68 +clicked=3 active=3
69 +clicked=4 active=4
70 +clicked=5 active=5
71 +clicked=9 active=9
72 +```
74 +Finding fixed during validation:
76 +- `Hyprland.dispatch("workspace N")` fails on this desktop because Hyprland is running in Lua mode.
77 +- Quickshell must dispatch Lua object syntax there: `hl.dsp.focus({ workspace = "N" })`.
78 +- `WorkspaceWidget.qml` now branches on `Hyprland.usingLua` and keeps normal dispatcher syntax for non-Lua Hyprland.
80 +## Legacy service boundary
82 +```text
83 +ironbar.service active
84 +ironbar-workspaces.service active
85 +mako.service active
86 +quickshell.service inactive/not installed live
87 +```
89 +No lingering `qs` processes remained after validation. Current workspace restored to `3` after click testing.

docs/super/plans/2026-06-17-quickshell-hypr-companions-phase-1-foundation.md

Modified
224 224 Text {
225 225 Layout.fillWidth: true
226 - text: "IPC: qs -c nugu ipc call nugu toggleDiagnostics"
226 + text: "IPC: qs ipc -c nugu call nugu toggleDiagnostics"
227 227 color: panel.theme.ui.minor
228 228 font.family: "IBM Plex Mono"
229 229 font.pixelSize: 11
294 294 Diagnostics:
297 -qs -c nugu ipc call nugu showDiagnostics
298 -qs -c nugu ipc call nugu hideDiagnostics
299 -qs -c nugu ipc call nugu toggleDiagnostics
300 -qs -c nugu ipc call nugu reloadTheme
301 -qs -c nugu ipc call nugu setThemeMode light
302 -qs -c nugu ipc call nugu setThemeMode dark
297 +qs ipc -c nugu call nugu showDiagnostics
298 +qs ipc -c nugu call nugu hideDiagnostics
299 +qs ipc -c nugu call nugu toggleDiagnostics
300 +qs ipc -c nugu call nugu reloadTheme
301 +qs ipc -c nugu call nugu setThemeMode light
302 +qs ipc -c nugu call nugu setThemeMode dark
427 427 - [ ] **Step 1: Start a temporary named config without systemd**
429 -Run from repo root:
429 +Run from repo root with a temporary named config link:
431 431 ```bash
432 -mkdir -p ~/.config/quickshell
433 -ln -sfn "$PWD/quickshell/nugu" ~/.config/quickshell/nugu
434 -QS_NO_RELOAD_POPUP=1 qs -c nugu >/tmp/nugu-qs-ipc.out 2>/tmp/nugu-qs-ipc.err &
432 +tmp="$(mktemp -d /tmp/nugu-qs-xdg.XXXXXX)"
433 +mkdir -p "$tmp/quickshell"
434 +ln -s "$PWD/quickshell/nugu" "$tmp/quickshell/nugu"
435 +printf '%s\n' "$tmp" >/tmp/nugu-qs-ipc.xdg
436 +XDG_CONFIG_HOME="$tmp" QS_NO_RELOAD_POPUP=1 qs -c nugu >/tmp/nugu-qs-ipc.out 2>/tmp/nugu-qs-ipc.err &
435 437 printf '%s\n' $! >/tmp/nugu-qs-ipc.pid
436 438 sleep 1
437 439 cat /tmp/nugu-qs-ipc.err
440 442 Expected: no QML parse/type errors.
442 -This command mutates one symlink under `~/.config/quickshell/nugu`; it is the same link the dorkfiles manifest will manage. If this is not acceptable in the live session, skip this task and validate after explicit link approval.
444 +This validation uses a temporary `XDG_CONFIG_HOME` and does not mutate `~/.config/quickshell`.
446 +For every IPC command below, prefix `XDG_CONFIG_HOME="$(cat /tmp/nugu-qs-ipc.xdg)"` when using this temporary config.
444 448 - [ ] **Step 2: Show diagnostics via IPC**
448 452 ```bash
449 -qs -c nugu ipc call nugu showDiagnostics
453 +qs ipc -c nugu call nugu showDiagnostics
450 454 sleep 1
459 463 ```bash
460 -qs -c nugu ipc call nugu setThemeMode light
464 +qs ipc -c nugu call nugu setThemeMode light
461 465 sleep 1
462 -qs -c nugu ipc call nugu setThemeMode dark
466 +qs ipc -c nugu call nugu setThemeMode dark
463 467 sleep 1
472 476 ```bash
473 -qs -c nugu ipc call nugu hideDiagnostics
477 +qs ipc -c nugu call nugu hideDiagnostics
476 480 Expected: diagnostics panel disappears.
482 486 ```bash
483 487 kill "$(cat /tmp/nugu-qs-ipc.pid)"
484 -rm -f /tmp/nugu-qs-ipc.pid
488 +rm -rf "$(cat /tmp/nugu-qs-ipc.xdg)"
489 +rm -f /tmp/nugu-qs-ipc.pid /tmp/nugu-qs-ipc.xdg
487 492 Expected: no `qs -c nugu` process remains from this task.
513 518 printf '## Commands\n\n'
514 519 printf -- '- `timeout 3s qs -p quickshell/nugu/shell.qml`\n'
515 520 printf -- '- `systemd-analyze --user verify hypr/systemd/quickshell.service`\n'
516 - printf -- '- `qs -c nugu ipc call nugu showDiagnostics`\n'
517 - printf -- '- `qs -c nugu ipc call nugu setThemeMode light`\n'
518 - printf -- '- `qs -c nugu ipc call nugu setThemeMode dark`\n'
519 - printf -- '- `qs -c nugu ipc call nugu hideDiagnostics`\n\n'
521 + printf -- '- `qs ipc -c nugu call nugu showDiagnostics`\n'
522 + printf -- '- `qs ipc -c nugu call nugu setThemeMode light`\n'
523 + printf -- '- `qs ipc -c nugu call nugu setThemeMode dark`\n'
524 + printf -- '- `qs ipc -c nugu call nugu hideDiagnostics`\n\n'
520 525 printf '## Results\n\n'
521 526 printf '### Direct parse/start stderr\n\n```text\n'
522 527 sed -n '1,120p' /tmp/nugu-qs-phase1.err 2>/dev/null || true

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

Modified
399 399 - [ ] **Step 1: Start temporary named config**
401 -Run from repo root after Phase 1 link exists, or create the same symlink used by Phase 1:
401 +Run from repo root with a temporary named config link:
403 403 ```bash
404 -mkdir -p ~/.config/quickshell
405 -ln -sfn "$PWD/quickshell/nugu" ~/.config/quickshell/nugu
406 -QS_NO_RELOAD_POPUP=1 qs -c nugu >/tmp/nugu-qs-2a-ipc.out 2>/tmp/nugu-qs-2a-ipc.err &
404 +tmp="$(mktemp -d /tmp/nugu-qs-2a-xdg.XXXXXX)"
405 +mkdir -p "$tmp/quickshell"
406 +ln -s "$PWD/quickshell/nugu" "$tmp/quickshell/nugu"
407 +printf '%s\n' "$tmp" >/tmp/nugu-qs-2a-ipc.xdg
408 +XDG_CONFIG_HOME="$tmp" QS_NO_RELOAD_POPUP=1 qs -c nugu >/tmp/nugu-qs-2a-ipc.out 2>/tmp/nugu-qs-2a-ipc.err &
407 409 printf '%s\n' $! >/tmp/nugu-qs-2a-ipc.pid
408 410 sleep 1
409 411 sed -n '1,160p' /tmp/nugu-qs-2a-ipc.err
412 -Expected: no QML parse/type errors. This does not use systemd and does not disable Ironbar.
414 +Expected: no QML parse/type errors. This does not use systemd, does not disable Ironbar, and does not mutate `~/.config/quickshell`.
416 +For every IPC command below, prefix `XDG_CONFIG_HOME="$(cat /tmp/nugu-qs-2a-ipc.xdg)"` when using this temporary config.
414 418 - [ ] **Step 2: Show bar**
418 422 ```bash
419 -qs -c nugu ipc call nugu showBar
423 +qs ipc -c nugu call nugu showBar
420 424 sleep 1
440 444 ```bash
441 -qs -c nugu ipc call nugu setThemeMode light
445 +qs ipc -c nugu call nugu setThemeMode light
442 446 sleep 1
443 -qs -c nugu ipc call nugu setThemeMode dark
447 +qs ipc -c nugu call nugu setThemeMode dark
444 448 sleep 1
456 460 ```bash
457 -qs -c nugu ipc call nugu hideBar
461 +qs ipc -c nugu call nugu hideBar
460 464 Expected: Quickshell bar disappears; Ironbar remains live.
466 470 ```bash
467 471 kill "$(cat /tmp/nugu-qs-2a-ipc.pid)"
468 -rm -f /tmp/nugu-qs-2a-ipc.pid
472 +rm -rf "$(cat /tmp/nugu-qs-2a-ipc.xdg)"
473 +rm -f /tmp/nugu-qs-2a-ipc.pid /tmp/nugu-qs-2a-ipc.xdg
469 474 ps -eo pid,pcpu,rss,comm,args | grep -E 'qs -c nugu|quickshell' | grep -v grep || true
489 494 The bar is hidden by default while Ironbar remains the live bar.
492 -qs -c nugu ipc call nugu showBar
493 -qs -c nugu ipc call nugu hideBar
494 -qs -c nugu ipc call nugu toggleBar
497 +qs ipc -c nugu call nugu showBar
498 +qs ipc -c nugu call nugu hideBar
499 +qs ipc -c nugu call nugu toggleBar
497 502 Phase 2A only covers bar shell, workspaces, and clock. Full Ironbar parity requires later Phase 2B/2C plans.
507 512 printf '# Quickshell Phase 2A Verification — 2026-06-17\n\n'
508 513 printf '## Commands\n\n'
509 514 printf -- '- `timeout 3s qs -p quickshell/nugu/shell.qml`\n'
510 - printf -- '- `qs -c nugu ipc call nugu showBar`\n'
511 - printf -- '- `qs -c nugu ipc call nugu setThemeMode light`\n'
512 - printf -- '- `qs -c nugu ipc call nugu setThemeMode dark`\n'
513 - printf -- '- `qs -c nugu ipc call nugu hideBar`\n\n'
515 + printf -- '- `qs ipc -c nugu call nugu showBar`\n'
516 + printf -- '- `qs ipc -c nugu call nugu setThemeMode light`\n'
517 + printf -- '- `qs ipc -c nugu call nugu setThemeMode dark`\n'
518 + printf -- '- `qs ipc -c nugu call nugu hideBar`\n\n'
514 519 printf '## Parse stderr\n\n```text\n'
515 520 sed -n '1,200p' /tmp/nugu-qs-2a-wired.err 2>/dev/null || true
516 521 printf '\n```\n\n'

docs/super/plans/2026-06-17-quickshell-hypr-companions-phase-2b-status-widgets.md

Modified
724 724 ```bash
725 -mkdir -p ~/.config/quickshell
726 -ln -sfn "$PWD/quickshell/nugu" ~/.config/quickshell/nugu
727 -QS_NO_RELOAD_POPUP=1 qs -c nugu >/tmp/nugu-qs-2b-ipc.out 2>/tmp/nugu-qs-2b-ipc.err &
725 +tmp="$(mktemp -d /tmp/nugu-qs-2b-xdg.XXXXXX)"
726 +mkdir -p "$tmp/quickshell"
727 +ln -s "$PWD/quickshell/nugu" "$tmp/quickshell/nugu"
728 +printf '%s\n' "$tmp" >/tmp/nugu-qs-2b-ipc.xdg
729 +XDG_CONFIG_HOME="$tmp" QS_NO_RELOAD_POPUP=1 qs -c nugu >/tmp/nugu-qs-2b-ipc.out 2>/tmp/nugu-qs-2b-ipc.err &
728 730 printf '%s\n' $! >/tmp/nugu-qs-2b-ipc.pid
729 731 sleep 2
730 732 sed -n '1,220p' /tmp/nugu-qs-2b-ipc.err
733 -Expected: no QML parse/type errors. Ironbar remains active.
735 +Expected: no QML parse/type errors. Ironbar remains active. This does not mutate `~/.config/quickshell`.
737 +For every IPC command below, prefix `XDG_CONFIG_HOME="$(cat /tmp/nugu-qs-2b-ipc.xdg)"` when using this temporary config.
735 739 - [ ] **Step 2: Show bar**
739 743 ```bash
740 -qs -c nugu ipc call nugu showBar
744 +qs ipc -c nugu call nugu showBar
741 745 sleep 2
783 787 ```bash
784 -qs -c nugu ipc call nugu hideBar
788 +qs ipc -c nugu call nugu hideBar
785 789 kill "$(cat /tmp/nugu-qs-2b-ipc.pid)"
786 -rm -f /tmp/nugu-qs-2b-ipc.pid
790 +rm -rf "$(cat /tmp/nugu-qs-2b-ipc.xdg)"
791 +rm -f /tmp/nugu-qs-2b-ipc.pid /tmp/nugu-qs-2b-ipc.xdg
787 792 ps -eo pid,pcpu,rss,comm,args | grep -E 'qs -c nugu|quickshell' | grep -v grep || true
827 832 printf '# Quickshell Phase 2B Verification — 2026-06-17\n\n'
828 833 printf '## Commands\n\n'
829 834 printf -- '- `timeout 3s qs -p quickshell/nugu/shell.qml`\n'
830 - printf -- '- `qs -c nugu ipc call nugu showBar`\n'
835 + printf -- '- `qs ipc -c nugu call nugu showBar`\n'
831 836 printf -- '- `wpctl get-volume @DEFAULT_AUDIO_SINK@`\n'
832 837 printf -- '- `brightnessctl -m`\n'
833 838 printf -- '- `systemctl --user is-active ironbar.service mako.service`\n\n'

docs/super/roadmaps/2026-06-17-quickshell-hypr-companions-roadmap.md

Modified
186 186 - Keep `cliphist` storage initially; replace `hyprlauncher --dmenu` frontend.
187 187 - Implement power/logout popup/window matching current Ironbar/hyprshutdown actions.
188 188 - Implement OSDs for volume, mic mute, brightness, media, lock/suspend/reload, screenshot, color pick.
189 -- Add Quickshell IPC methods and migrate relevant Hypr binds to `qs -c nugu ipc call ...`.
189 +- Add Quickshell IPC methods and migrate relevant Hypr binds to `qs ipc -c nugu call ...`.
191 191 **Out of scope:**

quickshell/nugu/Bar.qml

Added
new file mode 100644
1 +import QtQuick
2 +import QtQuick.Layouts
3 +import Quickshell
4 +import "."
6 +PanelWindow {
7 + id: root
9 + required property QtObject theme
10 + property bool shown: false
12 + // Keep the Phase 2A bar opt-in. A visible property instead of destroying the
13 + // panel gives reliable IPC toggles without service restarts.
14 + visible: shown
15 + anchors { top: true; left: true; right: true }
16 + implicitHeight: 30
17 + color: "transparent"
19 + // Match the Nugu/Ironbar visual language: translucent semantic backdrop plus
20 + // a hard accent line. This keeps screenshots comparable during parity checks.
21 + Rectangle {
22 + anchors.fill: parent
23 + color: `${root.theme.ui.backdrop}ee`
24 + }
26 + Rectangle {
27 + anchors.left: parent.left
28 + anchors.right: parent.right
29 + anchors.bottom: parent.bottom
30 + height: 2
31 + color: root.theme.ui.accent
32 + }
34 + RowLayout {
35 + anchors.fill: parent
36 + anchors.leftMargin: 20
37 + anchors.rightMargin: 20
38 + anchors.topMargin: 0
39 + anchors.bottomMargin: 2
40 + spacing: 8
42 + // Left and right zones reserve the future Ironbar parity layout now, so
43 + // adding Phase 2B widgets will not move workspaces/clock unexpectedly.
44 + RowLayout {
45 + Layout.fillWidth: true
46 + Layout.alignment: Qt.AlignVCenter
47 + spacing: 10
49 + WorkspaceWidget { theme: root.theme }
50 + }
52 + RowLayout {
53 + Layout.alignment: Qt.AlignCenter
54 + spacing: 8
56 + ClockWidget { theme: root.theme }
57 + }
59 + RowLayout {
60 + Layout.fillWidth: true
61 + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
62 + spacing: 8
63 + }
64 + }

quickshell/nugu/BarButton.qml

Added
new file mode 100644
1 +import QtQuick
3 +Item {
4 + id: root
6 + required property QtObject theme
7 + property string text: ""
8 + property bool active: false
9 + property bool muted: false
10 + property string tooltip: ""
12 + signal activated()
14 + // A single primitive keeps bar widgets visually consistent and avoids every
15 + // status module inventing its own hover/active colors.
16 + implicitWidth: label.implicitWidth + 14
17 + implicitHeight: 22
19 + Rectangle {
20 + anchors.fill: parent
21 + radius: 7
22 + color: root.active ? root.theme.ui.focus : (mouse.containsMouse ? root.theme.ui.accent : "transparent")
23 + }
25 + Text {
26 + id: label
27 + anchors.centerIn: parent
28 + text: root.text
29 + color: root.active || mouse.containsMouse
30 + ? root.theme.content.backdrop
31 + : (root.muted ? root.theme.ui.minor : root.theme.ui.normal)
32 + font.family: "IBM Plex Mono"
33 + font.pixelSize: 12
34 + font.bold: root.active
35 + font.features: { "tnum": 1 }
36 + }
38 + MouseArea {
39 + id: mouse
40 + anchors.fill: parent
41 + hoverEnabled: true
42 + acceptedButtons: Qt.LeftButton
43 + onClicked: root.activated()
44 + }

quickshell/nugu/ClockWidget.qml

Added
new file mode 100644
1 +import QtQuick
2 +import Quickshell
3 +import "."
5 +BarButton {
6 + id: root
8 + // Match Ironbar's compact HH:mm clock first; calendar popovers belong in a
9 + // later parity phase after the bar shell is stable.
10 + text: Qt.formatTime(clock.date, "HH:mm")
11 + active: false
12 + muted: false
14 + SystemClock {
15 + id: clock
16 + precision: SystemClock.Minutes
17 + }

quickshell/nugu/Diagnostics.qml

Modified
8 8 required property QtObject theme
10 + // Diagnostics deliberately floats below the real bar. It proves theme loading
11 + // and IPC without stealing exclusive screen space from Ironbar during rollout.
10 12 anchors { top: true; left: true }
11 13 margins { top: 36; left: 10 }
12 14 exclusiveZone: -1
40 42 Layout.fillWidth: true
41 43 spacing: 8
45 + // Swatches make theme regressions obvious in screenshots and give
46 + // a fast contrast sanity check before widgets are built.
43 47 Repeater {
44 48 model: [
45 49 panel.theme.ui.backdrop,
66 70 Text {
67 71 Layout.fillWidth: true
68 - text: "IPC: qs -c nugu ipc call nugu toggleDiagnostics"
72 + text: "IPC: qs ipc -c nugu call nugu toggleDiagnostics"
69 73 color: panel.theme.ui.minor
70 74 font.family: "IBM Plex Mono"
71 75 font.pixelSize: 11

quickshell/nugu/README.md

Modified
4 4 # Nugu Quickshell
6 6 Named Quickshell config for Hypr companion replacement.
8 8 Phase 1 is inert by default. It starts Quickshell, loads Nugu colors, and exposes diagnostics over IPC. It does not replace Ironbar or Mako.
10 +`nugu.json` is kept in this directory so the named config is self-contained after dorkfiles symlinks it into `~/.config/quickshell/nugu`.
10 12 Run directly:
12 14 ```sh
19 21 Diagnostics:
21 23 ```sh
22 -qs -c nugu ipc call nugu showDiagnostics
23 -qs -c nugu ipc call nugu hideDiagnostics
24 -qs -c nugu ipc call nugu toggleDiagnostics
25 -qs -c nugu ipc call nugu reloadTheme
26 -qs -c nugu ipc call nugu setThemeMode light
27 -qs -c nugu ipc call nugu setThemeMode dark
24 +qs ipc -c nugu call nugu showDiagnostics
25 +qs ipc -c nugu call nugu hideDiagnostics
26 +qs ipc -c nugu call nugu toggleDiagnostics
27 +qs ipc -c nugu call nugu reloadTheme
28 +qs ipc -c nugu call nugu setThemeMode light
29 +qs ipc -c nugu call nugu setThemeMode dark
32 +## Phase 2A bar IPC
34 +The bar is hidden by default while Ironbar remains the live bar.
36 +```sh
37 +qs ipc -c nugu call nugu showBar
38 +qs ipc -c nugu call nugu hideBar
39 +qs ipc -c nugu call nugu toggleBar
40 +```
42 +Phase 2A only covers bar shell, workspaces, and clock. Full Ironbar parity requires later Phase 2B/2C plans.

quickshell/nugu/Theme.qml

Modified
4 4 import QtQuick
5 5 import Quickshell
6 6 import Quickshell.Io
8 8 Item {
9 9 id: theme
11 + // Theme is a shared data object, not a visible surface. Keeping it as one Item
12 + // gives every widget the same Nugu tokens and keeps dark/light switching atomic.
10 13 visible: false
15 + // Read the live Nugu mode so Quickshell follows the rest of the desktop.
16 + // IPC can override it for preview/testing without writing global state.
12 17 readonly property string modePath: `${Quickshell.env("HOME")}/.cache/nugu/mode`
13 - readonly property string palettePath: Qt.resolvedUrl("../../hypr/generated/nugu.json")
15 - property string mode: readMode()
16 - property var palettes: readJson()
17 - property var palette: palettes[mode] || palettes.dark
19 + // Keep Quickshell self-contained: bootstrapping only has to symlink this folder.
20 + // The file is copied from hypr/generated/nugu.json when the config is updated.
21 + readonly property string palettePath: Qt.resolvedUrl("nugu.json")
19 - readonly property var content: palette.content
20 - readonly property var ui: palette.ui
21 - readonly property string error: palette.error
22 - readonly property string warning: palette.warning
23 - readonly property string info: palette.info
24 - readonly property string debug: palette.debug
23 + property string mode: "dark"
24 + property var palettes: ({ "dark": fallbackDark(), "light": fallbackDark() })
25 + property var palette: fallbackDark()
27 + // Expose semantic namespaces used by the desktop. These are assigned explicitly
28 + // on every mode change because QML does not reliably notify nested JS object reads.
29 + property var content: palette.content
30 + property var ui: palette.ui
31 + property string error: palette.error
32 + property string warning: palette.warning
33 + property string info: palette.info
34 + property string debug: palette.debug
26 36 FileView {
27 37 id: paletteFile
33 43 blockLoading: true
34 44 printErrors: false
35 45 watchChanges: true
36 - onFileChanged: {
37 - reload()
38 - }
46 + onFileChanged: theme.reload()
49 + Component.onCompleted: reload()
41 51 function readJson() {
42 52 const text = paletteFile.text()
43 53 if (text.length === 0) {
51 61 return text === "light" ? "light" : "dark"
64 + function applyMode(next: string): void {
65 + mode = next === "light" ? "light" : "dark"
66 + const selected = palettes[mode] || palettes.dark || fallbackDark()
68 + // Clone the selected object so bindings see a fresh value each time.
69 + palette = JSON.parse(JSON.stringify(selected))
70 + content = palette.content
71 + ui = palette.ui
72 + error = palette.error
73 + warning = palette.warning
74 + info = palette.info
75 + debug = palette.debug
76 + }
54 78 function reload(): void {
55 79 paletteFile.reload()
56 80 modeFile.reload()
57 81 palettes = readJson()
58 - mode = readMode()
59 - palette = palettes[mode] || palettes.dark
82 + applyMode(readMode())
62 85 function setMode(next: string): void {
63 - mode = next === "light" ? "light" : "dark"
64 - palette = palettes[mode] || palettes.dark
86 + applyMode(next)
67 89 function fallbackDark() {

quickshell/nugu/WorkspaceWidget.qml

Added
new file mode 100644
1 +import QtQuick
2 +import QtQuick.Layouts
3 +import Quickshell.Hyprland
4 +import "."
6 +RowLayout {
7 + id: root
9 + required property QtObject theme
11 + spacing: 4
13 + // Mirror the existing Ironbar workspace contract exactly. Hidden workspace 9
14 + // stays explicit because it is part of the user's muscle memory.
15 + property var workspaces: [
16 + { "id": 1, "label": "1 󰖟" },
17 + { "id": 2, "label": "2 󰅨" },
18 + { "id": 3, "label": "3 󰆍" },
19 + { "id": 4, "label": "4 󰭹" },
20 + { "id": 5, "label": "5 󰎆" },
21 + { "id": 9, "label": "9 󰉋" }
22 + ]
24 + function workspaceObject(id: int): var {
25 + return Hyprland.workspaces.values.find(workspace => workspace.id === id) || null
26 + }
28 + function active(id: int): bool {
29 + return Hyprland.focusedWorkspace !== null && Hyprland.focusedWorkspace.id === id
30 + }
32 + function occupied(id: int): bool {
33 + const workspace = workspaceObject(id)
34 + return workspace !== null && workspace.toplevels !== null && workspace.toplevels.values.length > 0
35 + }
37 + function dispatchWorkspace(id: int): void {
38 + const request = `workspace ${id}`
39 + // This desktop uses Hyprland Lua config. Quickshell wraps dispatches in
40 + // hl.dispatch(...) there, so it needs the same dispatcher object form as
41 + // hypr/modules/commands.lua. Non-Lua Hyprland keeps normal syntax.
42 + const luaRequest = `hl.dsp.focus({ workspace = ${JSON.stringify(String(id))} })`
43 + Hyprland.dispatch(Hyprland.usingLua ? luaRequest : request)
44 + }
46 + Repeater {
47 + model: root.workspaces
49 + BarButton {
50 + required property var modelData
52 + theme: root.theme
53 + text: modelData.label
54 + active: root.active(modelData.id)
55 + muted: !root.active(modelData.id) && !root.occupied(modelData.id)
56 + tooltip: `workspace ${modelData.id}`
57 + onActivated: {
58 + const workspace = root.workspaceObject(modelData.id)
59 + if (workspace !== null) {
60 + workspace.activate()
61 + } else {
62 + root.dispatchWorkspace(modelData.id)
63 + }
64 + }
65 + }
66 + }

quickshell/nugu/nugu.json

Added
new file mode 100644
1 +{
2 + "dark": {
3 + "debug": "#ed5eed",
4 + "error": "#ec6376",
5 + "warning": "#f0ee69",
6 + "info": "#3ec5e3",
7 + "content": {
8 + "normal": "#ededed",
9 + "backdrop": "#121212",
10 + "accent": "#d151d1",
11 + "minor": "#8b8b8b",
12 + "focus": "#7ba1aa",
13 + "unfocus": "#5d5d5d",
14 + "important_local": "#b59ae4",
15 + "important_global": "#dfd3f3"
16 + },
17 + "ui": {
18 + "normal": "#dbdbdb",
19 + "backdrop": "#242424",
20 + "accent": "#d86dd8",
21 + "minor": "#9d9d9d",
22 + "focus": "#9aabae",
23 + "unfocus": "#6f6f6f",
24 + "important_local": "#c9b6eb",
25 + "important_global": "#f3effb"
26 + }
27 + },
28 + "light": {
29 + "debug": "#a112a1",
30 + "error": "#bd172e",
31 + "warning": "#6e6c10",
32 + "info": "#116477",
33 + "content": {
34 + "normal": "#121212",
35 + "backdrop": "#ededed",
36 + "accent": "#ae2eae",
37 + "minor": "#3b3b3b",
38 + "focus": "#184e5b",
39 + "unfocus": "#6f6f6f",
40 + "important_local": "#715696",
41 + "important_global": "#4f3c69"
42 + },
43 + "ui": {
44 + "normal": "#242424",
45 + "backdrop": "#dbdbdb",
46 + "accent": "#922792",
47 + "minor": "#292929",
48 + "focus": "#15333b",
49 + "unfocus": "#5d5d5d",
50 + "important_local": "#604980",
51 + "important_global": "#3e2f53"
52 + }
53 + }

quickshell/nugu/shell.qml

Modified
6 6 Scope {
7 7 id: root
9 + // New surfaces start hidden so this config can run beside Ironbar/Mako until
10 + // the parity checklist says it is safe to retire the old companions.
9 11 property bool diagnosticsVisible: false
12 + property bool barVisible: false
11 - Theme { id: theme }
14 + // One theme object is shared across all panels so dark/light changes are
15 + // instant and every widget uses the same Nugu semantic palette.
16 + Theme { id: nuguTheme }
13 18 IpcHandler {
14 19 target: "nugu"
21 + // Diagnostics IPC gives us a safe visual probe before replacing any live service.
16 22 function showDiagnostics(): void { root.diagnosticsVisible = true }
17 23 function hideDiagnostics(): void { root.diagnosticsVisible = false }
18 24 function toggleDiagnostics(): void { root.diagnosticsVisible = !root.diagnosticsVisible }
19 - function reloadTheme(): void { theme.reload() }
20 - function setThemeMode(mode: string): void { theme.setMode(mode) }
26 + // Bar IPC lets Hypr binds and verification scripts exercise the Quickshell
27 + // bar while Ironbar remains the user's real production bar.
28 + function showBar(): void { root.barVisible = true }
29 + function hideBar(): void { root.barVisible = false }
30 + function toggleBar(): void { root.barVisible = !root.barVisible }
32 + function reloadTheme(): void { nuguTheme.reload() }
33 + function setThemeMode(mode: string): string {
34 + nuguTheme.setMode(mode)
35 + return nuguTheme.mode
36 + }
37 + function themeMode(): string { return nuguTheme.mode }
38 + }
40 + // Create one bar per monitor, matching Ironbar's multi-output behavior.
41 + Variants {
42 + model: Quickshell.screens
43 + delegate: Component {
44 + Bar {
45 + required property var modelData
47 + screen: modelData
48 + theme: nuguTheme
49 + shown: root.barVisible
50 + }
51 + }
23 54 Diagnostics {
24 55 visible: root.diagnosticsVisible
25 - theme: theme
56 + theme: nuguTheme