diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-23 16:28:59 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-23 16:28:59 +0200 |
| commit | f6d0f18f29bcaa77aae0b0e3d25f768937bec35b (patch) | |
| tree | eca71375bb514158b0f0407ddea1ad847cfaed34 /desktop/Prefs.qml | |
| parent | 6bb76a3ba15bac0980b85ed0b8a63633a1ee1a2f (diff) | |
| download | quickshell-f6d0f18f29bcaa77aae0b0e3d25f768937bec35b.tar.gz quickshell-f6d0f18f29bcaa77aae0b0e3d25f768937bec35b.zip | |
companion: Admired, the wallpaper list and what each monitor shows
The list is a plain text file whose path is a preference, the default
under ~/.config/keystone. Written through cat because an emptied list
is an empty file, which FileView.setText does not write.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/Prefs.qml')
| -rw-r--r-- | desktop/Prefs.qml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/desktop/Prefs.qml b/desktop/Prefs.qml index 6340b91..03ac980 100644 --- a/desktop/Prefs.qml +++ b/desktop/Prefs.qml @@ -56,6 +56,16 @@ Singleton { root.write(Object.assign({}, root.doc, { companion: on })); } + // The companion's wallpaper list, "" for the default in + // companion/Admired.qml. + property string companionBlushFile: "" + function setCompanionBlushFile(p) { + p = p.trim(); + if (p === root.companionBlushFile) return; + root.companionBlushFile = p; + root.write(Object.assign({}, root.doc, { companionBlushFile: p })); + } + // The settings window's sidebar width, dragged by its edge. readonly property int sidebarMin: 160 readonly property int sidebarMax: 420 @@ -115,6 +125,7 @@ Singleton { root.settingsSidebar = typeof w === "number" && w >= root.sidebarMin && w <= root.sidebarMax ? Math.round(w) : 200; root.companion = parsed.companion !== false; + root.companionBlushFile = typeof parsed.companionBlushFile === "string" ? parsed.companionBlushFile : ""; root.ready = true; } @@ -130,6 +141,6 @@ Singleton { onFileChanged: reload() onLoaded: root.reparse() // Missing file: the defaults, and nothing written. - onLoadFailed: { root.doc = {}; root.pinnedIp = ""; root.presets = null; root.settingsSidebar = 200; root.assistantModel = ""; root.companion = true; root.ready = true; } + onLoadFailed: { root.doc = {}; root.pinnedIp = ""; root.presets = null; root.settingsSidebar = 200; root.assistantModel = ""; root.companion = true; root.companionBlushFile = ""; root.ready = true; } } } |
