diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-16 13:15:46 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-16 13:15:46 +0200 |
| commit | 0c0ea6b422907df12deb48a1ea3d332d072b9f69 (patch) | |
| tree | cf674cd0972208492d544e34f273f6b46cc20e9d /appearance/Hypridle.qml | |
| parent | 222875656922ab5826b3d7c546bb3ab0a4e04e17 (diff) | |
| download | quickshell-0c0ea6b422907df12deb48a1ea3d332d072b9f69.tar.gz quickshell-0c0ea6b422907df12deb48a1ea3d332d072b9f69.zip | |
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.
Diffstat (limited to 'appearance/Hypridle.qml')
| -rw-r--r-- | appearance/Hypridle.qml | 6 |
1 files changed, 5 insertions, 1 deletions
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"; } } |
