From e1817027b1aafee74fd7d38ef109c932cb6758de Mon Sep 17 00:00:00 2001 From: bbedward Date: Fri, 2 Jan 2026 22:36:37 -0500 Subject: [PATCH] settings: add existence check in addition to RO check --- quickshell/Common/SessionData.qml | 2 +- quickshell/Common/SettingsData.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quickshell/Common/SessionData.qml b/quickshell/Common/SessionData.qml index 8016d7fb..685f3bdc 100644 --- a/quickshell/Common/SessionData.qml +++ b/quickshell/Common/SessionData.qml @@ -979,7 +979,7 @@ Singleton { property string sessionPath: Paths.strip(settingsFile.path) - command: ["sh", "-c", "[ -w \"" + sessionPath + "\" ] && echo 'writable' || echo 'readonly'"] + command: ["sh", "-c", "[ ! -f \"" + sessionPath + "\" ] || [ -w \"" + sessionPath + "\" ] && echo 'writable' || echo 'readonly'"] running: false stdout: StdioCollector { diff --git a/quickshell/Common/SettingsData.qml b/quickshell/Common/SettingsData.qml index 216b03d9..1d81fac5 100644 --- a/quickshell/Common/SettingsData.qml +++ b/quickshell/Common/SettingsData.qml @@ -1910,7 +1910,7 @@ Singleton { property string settingsPath: Paths.strip(settingsFile.path) - command: ["sh", "-c", "[ -w \"" + settingsPath + "\" ] && echo 'writable' || echo 'readonly'"] + command: ["sh", "-c", "[ ! -f \"" + settingsPath + "\" ] || [ -w \"" + settingsPath + "\" ] && echo 'writable' || echo 'readonly'"] running: false stdout: StdioCollector {