feat: add moonarch-waybar config merger wrapper
Update PKGBUILD version / update-pkgver (push) Successful in 4s

Waybar's include directive cannot merge arrays, making per-machine
module customization impossible without duplicating the entire config.

moonarch-waybar merges an optional ~/.config/waybar/userconfig with
the system config, supporting prepend/append on module arrays and
object merge for module definitions. Generates user style.css with
@import of system styles on first run.

System waybar config converted from JSONC to valid JSON for jq
compatibility. Niri startup and hotkey updated to use the wrapper.
This commit is contained in:
2026-04-09 17:04:24 +02:00
parent 4dd8aae2f0
commit 2363e76b4a
4 changed files with 82 additions and 78 deletions
+11
View File
@@ -27,6 +27,17 @@ Waybar-Toggle für wlsunset (Wayland-nativer Blaufilter):
- Signal SIGRTMIN+11 für sofortiges Waybar-Refresh
- Scripts: `moonarch-nightlight` (Toggle), `moonarch-waybar-nightlight` (Status-JSON)
## Waybar Config Merger (moonarch-waybar)
Waybar wird über `moonarch-waybar` gestartet (nicht direkt). Der Wrapper merged eine optionale User-Config (`~/.config/waybar/userconfig`) mit der System-Config (`/etc/xdg/waybar/config`):
- `prepend`/`append`-Keys in der userconfig erweitern `modules-left`/`modules-center`/`modules-right` Arrays
- Alle anderen Top-Level-Keys werden als Modul-Definitionen per Object-Merge eingefügt
- Merge wird nur bei Änderungen ausgeführt (Timestamp-Vergleich)
- Bei Fehler: `notify-send` + `logger`, Waybar startet mit System-Config
- Generiert `~/.config/waybar/style.css` mit `@import` der System-Styles falls nicht vorhanden
- Benötigt `jq` (in PKGBUILD als Dependency)
- System-Config muss valides JSON sein (kein JSONC)
## Konventionen
- Paketlisten sind einfache Textdateien, ein Paket pro Zeile, Kommentare mit `#`