From 02ddd010a0d32d445b72eabd52d704c1fb799ac3 Mon Sep 17 00:00:00 2001 From: Satoshoe Date: Sat, 19 Sep 2026 20:46:34 -0500 Subject: [PATCH] settings: skip unchanged saves so external edits are not swallowed (#3504) saveSettings() set _selfWrite before setText(). When the serialized settings were identical to the file, nothing was written, no fileChanged followed, and the flag stayed set. The next external edit of settings.json was then taken for our own write and never reloaded. (cherry picked from commit 84594e6449991cde38a3e1a603c6e9314efa3b3f) --- quickshell/Common/SettingsData.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickshell/Common/SettingsData.qml b/quickshell/Common/SettingsData.qml index d28b2a5cf..605e5f462 100644 --- a/quickshell/Common/SettingsData.qml +++ b/quickshell/Common/SettingsData.qml @@ -1988,8 +1988,11 @@ Singleton { function saveSettings() { if (_loading || _parseError || !_hasLoaded) return; + const json = JSON.stringify(Store.toJson(root), null, 2); + if (json === settingsFile.text()) + return; _selfWrite = true; - settingsFile.setText(JSON.stringify(Store.toJson(root), null, 2)); + settingsFile.setText(json); if (_isReadOnly) _checkSettingsWritable(); }