From 5cdbc880afa6201f8aa289d52e434d04ecdc2c84 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 16 Sep 2026 12:30:30 +0200 Subject: fix(appearance): refuse to save hypridle before the config has loaded save() could run before refresh()'s async cat completed, when prefix and tail are empty and listeners is empty, so it would write an empty file and restart hypridle with no listeners. The real config always has a general block, so an empty prefix means the load has not happened or failed. --- appearance/Hypridle.qml | 1 + 1 file changed, 1 insertion(+) (limited to 'appearance') diff --git a/appearance/Hypridle.qml b/appearance/Hypridle.qml index 38a3483..e265b88 100644 --- a/appearance/Hypridle.qml +++ b/appearance/Hypridle.qml @@ -150,6 +150,7 @@ listener { FileView { id: confFile; path: root.confPath } function save() { + if (root.prefix === "") 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"]); } -- cgit v1.2.3