diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-15 11:24:49 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-15 11:24:49 +0200 |
| commit | e22d2ccee82b829875fe343cf1be48975174b054 (patch) | |
| tree | 8445170966a2f41a1cc4411c792ac74c97a1ea3d /desktop/Prefs.qml | |
| parent | 021c2d42271cdda15a4fdf129ce162d8af8a9ab5 (diff) | |
| download | quickshell-e22d2ccee82b829875fe343cf1be48975174b054.tar.gz quickshell-e22d2ccee82b829875fe343cf1be48975174b054.zip | |
refactor(island): the controls panel goes
Each of its seven tiles opened a drawer page that already existed, and it
went unused. SUPER alone will open the drawer instead. Removed with it: the
status pill's controls icon, Island.toggleControls, the island IPC target,
Controls.js and its test, and the controls list in Prefs. Prefs now holds
only the pinned IP; a controls key left in desktop.json is still kept on
write, because writes merge into the parsed document.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/Prefs.qml')
| -rw-r--r-- | desktop/Prefs.qml | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/desktop/Prefs.qml b/desktop/Prefs.qml index c342aba..fa0dde9 100644 --- a/desktop/Prefs.qml +++ b/desktop/Prefs.qml @@ -14,7 +14,6 @@ pragma Singleton import Quickshell import Quickshell.Io import QtQuick -import "island/Controls.js" as Controls // Preferences that must survive a reboot, in one JSON file under the state // home. Only the shell writes it, which is why it is not in ~/.config. @@ -29,9 +28,6 @@ Singleton { (Quickshell.env("XDG_STATE_HOME") || Quickshell.env("HOME") + "/.local/state") + "/quickshell/desktop.json" - // Visible control tiles, in display order. - property var controls: Controls.defaults() - // The public IP the user pinned from the performance panel; "" for none. property string pinnedIp: "" @@ -39,11 +35,6 @@ Singleton { // know about. property var doc: ({}) - function setControls(list) { - root.controls = Controls.normalize(list); - root.write(Object.assign({}, root.doc, { controls: root.controls })); - } - function setPinnedIp(ip) { if (ip === root.pinnedIp) return; root.pinnedIp = ip; @@ -63,9 +54,6 @@ Singleton { if (v && typeof v === "object" && !Array.isArray(v)) parsed = v; } catch (e) {} root.doc = parsed; - const next = "controls" in parsed ? Controls.normalize(parsed.controls) : Controls.defaults(); - // The watch also fires on our own write; compare so it is a no-op. - if (JSON.stringify(next) !== JSON.stringify(root.controls)) root.controls = next; const pin = parsed.perf && typeof parsed.perf.pinnedIp === "string" ? parsed.perf.pinnedIp : ""; if (pin !== root.pinnedIp) root.pinnedIp = pin; } @@ -77,11 +65,11 @@ Singleton { watchChanges: true printErrors: false // printErrors is off for the missing-file read; a failed write still - // has to be heard, or the new order silently vanishes at restart. + // has to be heard, or the pin silently vanishes at restart. onSaveFailed: error => console.warn("Prefs: writing", root.path, "failed:", error) onFileChanged: reload() onLoaded: root.reparse() // Missing file: the defaults, and nothing written. - onLoadFailed: { root.doc = {}; root.controls = Controls.defaults(); root.pinnedIp = ""; } + onLoadFailed: { root.doc = {}; root.pinnedIp = ""; } } } |
