diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-18 17:33:46 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-18 17:33:46 +0200 |
| commit | b4be7d036bbe19339c3c8ab66a06ce6f0f9e9db9 (patch) | |
| tree | 8c815bd011976dfeaccd7cf7dbc41e5cde61af8e /shared/Status.qml | |
| parent | 8019ddbb7e09a82d4da89bfd2e7a6a92fbdf2645 (diff) | |
| download | quickshell-b4be7d036bbe19339c3c8ab66a06ce6f0f9e9db9.tar.gz quickshell-b4be7d036bbe19339c3c8ab66a06ce6f0f9e9db9.zip | |
fix(status): only pause/resume a running breaktimer daemon
breaktimer.sh's pause and resume arms write the state file whether or not
a daemon is running, so statusctl presentation set while the daemon was
stopped recorded a phantom paused/running state and the tile then showed
Paused or a frozen countdown for a daemon that does not exist. Gate both
verbs on btRunning, the singleton's running-or-paused derived state, so a
verb is only sent when a daemon actually exists.
Diffstat (limited to 'shared/Status.qml')
| -rw-r--r-- | shared/Status.qml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/shared/Status.qml b/shared/Status.qml index 5d799e2..dfb6b83 100644 --- a/shared/Status.qml +++ b/shared/Status.qml @@ -124,11 +124,13 @@ Singleton { root.nolockBeforePresentation = root.nolock; root.setMode("dnd", true); root.setMode("nolock", true); - root.runBreaktimer("pause"); + // pause/resume write the state file whether or not a daemon + // runs, so send the verb only when one exists. + if (root.btRunning) root.runBreaktimer("pause"); } else { root.setMode("dnd", root.dndBeforePresentation); root.setMode("nolock", root.nolockBeforePresentation); - root.runBreaktimer("resume"); + if (root.btRunning) root.runBreaktimer("resume"); } } |
