aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/Prefs.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/Prefs.qml')
-rw-r--r--desktop/Prefs.qml16
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 = ""; }
}
}