From 0c0ea6b422907df12deb48a1ea3d332d072b9f69 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 16 Sep 2026 13:15:46 +0200 Subject: fix(appearance): final review fixes for the Sunset, Idle and Icons tabs xcur2png wrote its config file into the qs CWD, which is the repo root, so hovering a legacy Xcursor theme left a stray left_ptr.conf in the tree. Point -c at the per-theme cache dir instead. Hyprsunset.save() could run before refresh()'s two cat processes landed and write a header-only hyprsunset.conf, blanking the location. Guard on the same confLoaded/appLoaded flags Hypridle already uses. The idle save had no acknowledgement, which the spec requires. Add a notice after the restart and show it in the tab, and switch Hypridle's save guard to a loaded flag so a config whose first block is a listener is not mistaken for an unloaded one. classify() used else if, so a directory carrying both index.theme and cursors/ (Adwaita) was listed as a cursor theme only and never reached the icon picker. Make the two tests independent; selftest gains the dual-purpose case. --- appearance/Hypridle.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'appearance/Hypridle.qml') diff --git a/appearance/Hypridle.qml b/appearance/Hypridle.qml index e265b88..1696f5f 100644 --- a/appearance/Hypridle.qml +++ b/appearance/Hypridle.qml @@ -27,6 +27,8 @@ Singleton { property string prefix: "" property var listeners: [] property string tail: "" + property string notice: "" + property bool loaded: false function getField(body, key) { const m = body.match(new RegExp(`^\\s*${key}\\s*=\\s*(.+?)\\s*$`, "m")); @@ -143,6 +145,7 @@ listener { root.prefix = p.prefix; root.listeners = p.listeners; root.tail = p.tail; + root.loaded = true; } } } @@ -150,8 +153,9 @@ listener { FileView { id: confFile; path: root.confPath } function save() { - if (root.prefix === "") return; // not loaded yet: writing would truncate the file + if (!root.loaded) return; // not loaded yet: writing would truncate the file confFile.setText(root.serialize(root.prefix, root.listeners, root.tail)); Quickshell.execDetached(["sh", "-c", "pkill -x hypridle; setsid -f hypridle"]); + root.notice = "saved; idle timers reset"; } } -- cgit v1.2.3