fix: persists config after reboots
This commit is contained in:
+3
-4
@@ -96,10 +96,9 @@ Item {
|
|||||||
// display is frozen (keys are ignored). The bar button writes/removes the
|
// 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.
|
// file; both sides watch it, so a click on any monitor updates all of them.
|
||||||
property bool paused: false
|
property bool paused: false
|
||||||
readonly property string pausePath: {
|
// Persisted next to the config so the pause state survives restarts
|
||||||
var runtime = Quickshell.env("XDG_RUNTIME_DIR")
|
// (the runtime dir is wiped on reboot).
|
||||||
return (runtime && runtime.length > 0 ? runtime : "/tmp") + "/omarchy-key-visualizer.paused"
|
readonly property string pausePath: Quickshell.env("HOME") + "/.config/omarchy/key-visualizer.paused"
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------- layout
|
// ------------------------------------------------------------- layout
|
||||||
|
|
||||||
|
|||||||
@@ -35,10 +35,9 @@ Panel {
|
|||||||
// code on any file change under ~/.config/omarchy/plugins/), so editing it
|
// code on any file change under ~/.config/omarchy/plugins/), so editing it
|
||||||
// updates the display live instead of restarting the plugin.
|
// updates the display live instead of restarting the plugin.
|
||||||
readonly property string configPath: Quickshell.env("HOME") + "/.config/omarchy/key-visualizer.json"
|
readonly property string configPath: Quickshell.env("HOME") + "/.config/omarchy/key-visualizer.json"
|
||||||
readonly property string pausePath: {
|
// Persisted next to the config so the pause state survives restarts
|
||||||
var runtime = Quickshell.env("XDG_RUNTIME_DIR")
|
// (the runtime dir is wiped on reboot).
|
||||||
return (runtime && runtime.length > 0 ? runtime : "/tmp") + "/omarchy-key-visualizer.paused"
|
readonly property string pausePath: Quickshell.env("HOME") + "/.config/omarchy/key-visualizer.paused"
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------- pause
|
// ------------------------------------------------------------- pause
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user