diff --git a/KeyVisualizer.qml b/KeyVisualizer.qml index 319e4f6..67568fe 100644 --- a/KeyVisualizer.qml +++ b/KeyVisualizer.qml @@ -96,10 +96,9 @@ Item { // display is frozen (keys are ignored). The bar button writes/removes the // file; both sides watch it, so a click on any monitor updates all of them. property bool paused: false - readonly property string pausePath: { - var runtime = Quickshell.env("XDG_RUNTIME_DIR") - return (runtime && runtime.length > 0 ? runtime : "/tmp") + "/omarchy-key-visualizer.paused" - } + // Persisted next to the config so the pause state survives restarts + // (the runtime dir is wiped on reboot). + readonly property string pausePath: Quickshell.env("HOME") + "/.config/omarchy/key-visualizer.paused" // ------------------------------------------------------------- layout diff --git a/Panel.qml b/Panel.qml index 53d60da..14ba72e 100644 --- a/Panel.qml +++ b/Panel.qml @@ -35,10 +35,9 @@ Panel { // code on any file change under ~/.config/omarchy/plugins/), so editing it // updates the display live instead of restarting the plugin. readonly property string configPath: Quickshell.env("HOME") + "/.config/omarchy/key-visualizer.json" - readonly property string pausePath: { - var runtime = Quickshell.env("XDG_RUNTIME_DIR") - return (runtime && runtime.length > 0 ? runtime : "/tmp") + "/omarchy-key-visualizer.paused" - } + // Persisted next to the config so the pause state survives restarts + // (the runtime dir is wiped on reboot). + readonly property string pausePath: Quickshell.env("HOME") + "/.config/omarchy/key-visualizer.paused" // ------------------------------------------------------------- pause