aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/deckit/DeckItDashboardPage.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-10 20:09:46 +0100
committerDanilo M. <danix@danix.xyz>2026-11-10 20:09:46 +0100
commitcd7035be76c82c15d172a6827c3c8f81df723424 (patch)
tree0daa73c531e81a53b872877ee060e3d9d1403d8d /desktop/modules/deckit/DeckItDashboardPage.qml
parent8a84306ff64deb542ef8de60cc30d490c5e25aff (diff)
downloadquickshell-cd7035be76c82c15d172a6827c3c8f81df723424.tar.gz
quickshell-cd7035be76c82c15d172a6827c3c8f81df723424.zip
feat(deckit): split the settings into a deck-it group of four pages
The single long deck-it page becomes its own sidebar group: General (status, Restart, Start, Display, Advanced), Dashboard (Modules, action icons, Hardware), Windows (launchers, workspaces) and Services (OBS, LLM, K1C, build VM). All four share DeckIt.store, so Save on any page writes the whole draft, as the Mail pages do. Each module lists its own fields, so a search jumps to the page holding the field. The small-print text moves to a shared Small.qml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/deckit/DeckItDashboardPage.qml')
-rw-r--r--desktop/modules/deckit/DeckItDashboardPage.qml82
1 files changed, 82 insertions, 0 deletions
diff --git a/desktop/modules/deckit/DeckItDashboardPage.qml b/desktop/modules/deckit/DeckItDashboardPage.qml
new file mode 100644
index 0000000..658f07b
--- /dev/null
+++ b/desktop/modules/deckit/DeckItDashboardPage.qml
@@ -0,0 +1,82 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+import QtQuick
+import "../.."
+import "../qtmaildir"
+
+// deck-it's Dashboard page: its panels, its action icons, the hardware it reads.
+Column {
+ id: col
+ spacing: 6
+ readonly property var st: DeckIt.store
+ function def(section, key) { return col.st.fallback(section, key); }
+
+ // The dashboard's action icons: every id deck-it knows is in the
+ // defaults' list; the file keeps the ones switched on, in that order.
+ readonly property var allActions: col.def("dashboard", "actions") ?? []
+ readonly property var actions: col.st.value("dashboard", "actions") ?? col.allActions
+ function setAction(id, on) {
+ col.st.put("dashboard", "actions",
+ col.allActions.filter(a => a === id ? on : col.actions.includes(a)));
+ }
+
+ Small { visible: DeckIt.defaultsError !== ""; color: Theme.red; text: DeckIt.defaultsError }
+
+ Heading { objectName: "modules/"; text: "Modules" }
+ Small { text: "The dashboard's panels and tabs." }
+ Repeater {
+ model: Object.keys(col.def("modules") ?? {})
+ BoolSetting {
+ required property string modelData
+ store: col.st; section: "modules"; key: modelData; label: modelData
+ fallback: col.def("modules", modelData) ?? true
+ }
+ }
+
+ Heading { objectName: "dashboard/actions"; text: "Dashboard actions" }
+ Small { text: "Icon buttons at the bottom of the tablet's dashboard." }
+ Repeater {
+ model: col.allActions
+ Item {
+ id: act
+ required property string modelData
+ width: col.width
+ height: 34
+ Text {
+ id: actLabel
+ anchors { left: parent.left; verticalCenter: parent.verticalCenter }
+ width: 160
+ text: act.modelData
+ color: Theme.subtext
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 3 }
+ }
+ Switch {
+ anchors { left: actLabel.right; leftMargin: 8; verticalCenter: parent.verticalCenter }
+ checked: col.actions.includes(act.modelData)
+ onToggled: on => col.setAction(act.modelData, on)
+ }
+ }
+ }
+
+ Heading { text: "Hardware" }
+ Small { text: "Each is auto, or a fixed value such as wlan0, BAT1 or coretemp." }
+ Setting { store: col.st; section: "hardware"; key: "net"; label: "Network interface"
+ placeholder: col.st.placeholder("hardware", "net") }
+ Setting { store: col.st; section: "hardware"; key: "battery"; label: "Battery"
+ placeholder: col.st.placeholder("hardware", "battery") }
+ Setting { store: col.st; section: "hardware"; key: "cpu_sensor"; label: "CPU sensor"
+ placeholder: col.st.placeholder("hardware", "cpu_sensor") }
+ Setting { store: col.st; section: "hardware"; key: "gpu"; label: "GPU"
+ placeholder: col.st.placeholder("hardware", "gpu"); hint: "auto (Intel xe) or none." }
+ Setting { store: col.st; section: "hardware"; key: "gpu_mem_total"; label: "GPU memory"
+ placeholder: col.st.placeholder("hardware", "gpu_mem_total"); hint: "The xe driver reports no VRAM size: the card's total, like 12G." }
+}