diff --git a/CLAUDE.md b/CLAUDE.md index 614893d..160564d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -41,9 +41,11 @@ Waybar is started via `moonarch-waybar` (not directly). The wrapper merges an op - Requires `jq` (declared as a dependency in the PKGBUILD) - The system config must be valid JSON (no JSONC) -## Quickshell Bar: User Extension (Pilot) +## Quickshell Bar -The quickshell bar (`defaults/xdg/quickshell/`, deployed to `/etc/xdg/quickshell/`) is system-provided but user-extensible without forking the whole config. quickshell has no native merge — the mechanism is built in-repo: +quickshell is the **default bar and notification daemon**, spawned by niri as `quickshell` (`defaults/xdg/niri/config.kdl`); it loads `/etc/xdg/quickshell/` via XDG discovery (no `-p`, no wrapper). Both Waybar and swaync stay fully installed as **reserves** (no hard deletes) but are no longer autostarted: Waybar toggles via **Alt+W** (`pkill quickshell` ⇄ `moonarch-waybar`); swaync's `spawn-at-startup` is commented out so it releases `org.freedesktop.Notifications` for quickshell's own `NotificationServer`. To switch back: re-enable swaync's spawn and drop quickshell's `NotifToastHost` from `shell.qml`. + +The bar (`defaults/xdg/quickshell/`) is system-provided but user-extensible without forking the whole config — quickshell has no native merge, so the mechanism is built in-repo: - **Toggle widgets** — `~/.config/quickshell/moonarch.json`: ```json diff --git a/DECISIONS.md b/DECISIONS.md index 42c5419..fe92bb1 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -182,3 +182,9 @@ - **Why**: quickshell has no native config merge/drop-in/plugin system — it picks a single config root by XDG precedence. We want a system-provided bar (`/etc/xdg/quickshell/`) that a user can *configure* (toggle widgets) and *extend* (own widgets) without forking the whole config and losing system updates for their part. - **Tradeoffs**: Two behaviours were spiked against quickshell 0.3.0 first, not guessed: (1) a `~/.config/quickshell/` dir *without* a `shell.qml` does **not** displace the system config — so the user's files may live at the natural path. (2) User QML in a foreign dir cannot see our singletons implicitly, but a `qmldir` in the system dir + `import "file:///etc/xdg/quickshell"` exposes singletons **and** components natively (verified: `Theme.accent` resolves; property-injection via `Loader.setSource` is the fallback). Scope kept to **toggle + add** — no per-widget override (expensive: per-slot loader + the hardcoded `Popouts.qml` registry) and no reordering/user-popouts (follow-up). Toggles use JSON (Waybar-familiar, reuses the `NightlightService` FileView+JSON pattern); own widgets stay QML (unavoidable). A user widget rooted at/containing `ModuleBox` must not anchor its direct child with `centerIn: parent` — that hits a pre-existing `childrenRect` binding loop in `ModuleBox` (documented, not fixed here). - **How**: New `UserConfig.qml` singleton reads `~/.config/quickshell/moonarch.json` (`{"widgets":{"":false}}`, absent/broken = all on) and probes for `UserWidgets.qml`. New `qmldir` (generated from the `.qml` files) declares all singletons + components for cross-dir import. `Bar.qml` gates each of the 16 widgets on `UserConfig.enabled("")` (self-hiding widgets combine it into their internal `visible`; group `ModuleBox`es hide when all their keys are off) and adds a `Loader` slot (right cluster) bound to `UserWidgets.qml` when present. Still a pilot — the `qmldir` must be shipped when the pilot is later packaged. + +## 2026-07-05 – Quickshell bar: promoted from pilot to default (Waybar + swaync kept as reserves) +- **Who**: Dominik, ClaudeCode +- **Why**: The pilot proved out in daily use. Make quickshell the session's default bar **and** notification daemon. "Remove nothing" means no hard deletes — Waybar and swaync stay installed, just no longer autostarted. +- **Tradeoffs**: Considered a `moonarch-bar` switch wrapper (config-driven bar selection) but rejected as over-engineering — Waybar is only a reserve, so a persistent setting isn't worth it; niri spawns `quickshell` directly and **Alt+W** toggles quickshell ⇄ Waybar. Notifications move to quickshell's own `NotificationServer`; swaync's `spawn-at-startup` is commented out (not deleted) so it releases `org.freedesktop.Notifications` — flip the comment back (and drop quickshell's `NotifToastHost`) to return to swaync. The quickshell config needs no PKGBUILD change (moonarch-git's generic `find` loop over `defaults/xdg/` already installs `/etc/xdg/quickshell/`, `qmldir` included); only the `quickshell` runtime package was added. +- **How**: `defaults/xdg/niri/config.kdl` — `spawn-at-startup "quickshell"` (was `moonarch-waybar`), swaync spawn commented out, Alt+W bar toggle. `quickshell` added to `packages/official.txt` and moonarch-git `PKGBUILD` `depends` (Waybar + swaync stay in both — reserves, not removed). quickshell's notification stack stays active (`NotifToastHost` in `shell.qml`, `NotificationIndicator` in `Bar.qml`, `notifications` popout). Verified: config loads via `qs -p` with zero binding loops; `niri validate` passes. Remaining manual step: end-to-end deploy (push → CI rebuilds moonarch-git → `pacman -Syu`) and the swaync→quickshell notification handover (test with swaync not running, since a running swaync holds the D-Bus name). diff --git a/defaults/xdg/niri/config.kdl b/defaults/xdg/niri/config.kdl index 277899e..90c5edb 100644 --- a/defaults/xdg/niri/config.kdl +++ b/defaults/xdg/niri/config.kdl @@ -79,8 +79,10 @@ layout { // xwayland-satellite is managed automatically since niri 25.08 // kanshi is managed via systemd user service (kanshi.service) -spawn-at-startup "moonarch-waybar" -spawn-at-startup "swaync" +// Bar: quickshell is the default; Waybar stays installed as a reserve (toggle with Alt+W). +spawn-at-startup "quickshell" +// swaync disabled — quickshell owns notifications now; package kept installed as a reserve. +// spawn-at-startup "swaync" spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" spawn-at-startup "nm-applet" "--indicator" spawn-sh-at-startup "waypaper --restore" @@ -131,7 +133,7 @@ binds { Super+C hotkey-overlay-title=null { spawn "walker" "-s" "clipboard"; } - Alt+W { spawn-sh "killall waybar && moonarch-waybar &"; } + Alt+W hotkey-overlay-title="Toggle bar: quickshell / Waybar" { spawn-sh "if pkill -x quickshell; then moonarch-waybar & else killall waybar; quickshell & fi"; } Super+E { spawn-sh "xdg-open ~"; } diff --git a/packages/official.txt b/packages/official.txt index 324042d..7e34f68 100644 --- a/packages/official.txt +++ b/packages/official.txt @@ -60,6 +60,7 @@ xwayland-satellite # Desktop Utilities waybar +quickshell swaync cliphist wl-clipboard