aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/deckit
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/deckit')
-rw-r--r--desktop/modules/deckit/DeckItDashboardModule.qml2
-rw-r--r--desktop/modules/deckit/DeckItDashboardPage.qml9
-rw-r--r--desktop/modules/deckit/DeckItGeneralPage.qml12
-rw-r--r--desktop/modules/deckit/DeckItModule.qml2
-rw-r--r--desktop/modules/deckit/Modules.js24
-rw-r--r--desktop/modules/deckit/README.md11
6 files changed, 50 insertions, 10 deletions
diff --git a/desktop/modules/deckit/DeckItDashboardModule.qml b/desktop/modules/deckit/DeckItDashboardModule.qml
index 4517723..3ad8cf6 100644
--- a/desktop/modules/deckit/DeckItDashboardModule.qml
+++ b/desktop/modules/deckit/DeckItDashboardModule.qml
@@ -24,7 +24,7 @@ Module {
keywords: ["deck-it", "tablet", "dashboard", "modules", "panels", "actions", "icons", "hardware",
"network", "battery", "cpu", "gpu", "sensor"]
readonly property var fields: [
- ["modules", "", "Modules"], ["dashboard", "actions", "Dashboard actions"],
+ ["modules", "", "Dashboard parts"], ["dashboard", "actions", "Dashboard actions"],
["hardware", "net", "Network interface"], ["hardware", "battery", "Battery"],
["hardware", "cpu_sensor", "CPU sensor"], ["hardware", "gpu", "GPU"],
["hardware", "gpu_mem_total", "GPU memory"]]
diff --git a/desktop/modules/deckit/DeckItDashboardPage.qml b/desktop/modules/deckit/DeckItDashboardPage.qml
index 658f07b..0ab032f 100644
--- a/desktop/modules/deckit/DeckItDashboardPage.qml
+++ b/desktop/modules/deckit/DeckItDashboardPage.qml
@@ -12,6 +12,7 @@
import QtQuick
import "../.."
import "../qtmaildir"
+import "Modules.js" as Modules
// deck-it's Dashboard page: its panels, its action icons, the hardware it reads.
Column {
@@ -31,13 +32,13 @@ Column {
Small { visible: DeckIt.defaultsError !== ""; color: Theme.red; text: DeckIt.defaultsError }
- Heading { objectName: "modules/"; text: "Modules" }
- Small { text: "The dashboard's panels and tabs." }
+ Heading { objectName: "modules/"; text: "Dashboard parts" }
+ Small { text: "What the Dashboard shows. The OBS and K1C tabs, on the General page, also feed its running row." }
Repeater {
- model: Object.keys(col.def("modules") ?? {})
+ model: Modules.parts(Object.keys(col.def("modules") ?? {}))
BoolSetting {
required property string modelData
- store: col.st; section: "modules"; key: modelData; label: modelData
+ store: col.st; section: "modules"; key: modelData; label: Modules.name(modelData)
fallback: col.def("modules", modelData) ?? true
}
}
diff --git a/desktop/modules/deckit/DeckItGeneralPage.qml b/desktop/modules/deckit/DeckItGeneralPage.qml
index 358574f..776099a 100644
--- a/desktop/modules/deckit/DeckItGeneralPage.qml
+++ b/desktop/modules/deckit/DeckItGeneralPage.qml
@@ -13,6 +13,7 @@ import Quickshell
import QtQuick
import "../.."
import "../qtmaildir"
+import "Modules.js" as Modules
// deck-it's General page: the intro, Start, Display and Advanced. Every field
// edits the draft of ~/.config/deck-it/config.toml shared by the four deck-it
@@ -76,6 +77,17 @@ Column {
Setting { store: col.st; section: "display"; key: "name"; label: "Output name"
placeholder: col.st.placeholder("display", "name") }
+ Heading { objectName: "modules/tabs"; text: "Tabs" }
+ Small { text: "The tablet's tabs beside the Dashboard." }
+ Repeater {
+ model: Modules.tabs(Object.keys(col.def("modules") ?? {}))
+ BoolSetting {
+ required property string modelData
+ store: col.st; section: "modules"; key: modelData; label: Modules.name(modelData)
+ fallback: col.def("modules", modelData) ?? true
+ }
+ }
+
Heading { text: "Advanced" }
Setting { store: col.st; section: "ports"; key: "command_center"; label: "Dashboard port"; kind: "int"; min: 1024; max: 65535
placeholder: col.st.placeholder("ports", "command_center"); hint: "On the tablet's localhost, through adb reverse." }
diff --git a/desktop/modules/deckit/DeckItModule.qml b/desktop/modules/deckit/DeckItModule.qml
index 973ef1c..623bdc8 100644
--- a/desktop/modules/deckit/DeckItModule.qml
+++ b/desktop/modules/deckit/DeckItModule.qml
@@ -33,7 +33,7 @@ Module {
["display", "position", "Position"], ["display", "scale", "Scale"],
["display", "refresh", "Refresh"], ["display", "name", "Output name"],
["ports", "command_center", "Dashboard port"], ["ports", "display", "Display port"],
- ["", "hyprland", "Hyprland config"], ["icons", "theme", "Fallback icon theme"]]
+ ["modules", "tabs", "Tabs"], ["", "hyprland", "Hyprland config"], ["icons", "theme", "Fallback icon theme"]]
searchItems: fields.map(f => ({ text: f[2], key: f[0] + "/" + f[1] }))
function refresh() { DeckIt.reload(); }
diff --git a/desktop/modules/deckit/Modules.js b/desktop/modules/deckit/Modules.js
new file mode 100644
index 0000000..7bfbdbc
--- /dev/null
+++ b/desktop/modules/deckit/Modules.js
@@ -0,0 +1,24 @@
+// 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.
+
+.pragma library
+
+// deck-it's [modules] split for the pages: the ones with a tab of their own,
+// and the rest, which only feed the Dashboard. A module deck-it adds later
+// lands with the Dashboard ones until it is listed here.
+var TABS = ["windows", "obs", "k1c", "assistant"];
+var NAMES = { stats: "System", music: "Music", llm: "LLM usage", tablet: "Tablet",
+ sbbuilder: "Build VM", actions: "Action icons", windows: "Windows",
+ obs: "OBS", k1c: "K1C printer", assistant: "Assistant" };
+
+function tabs(all) { return all.filter(m => TABS.includes(m)); }
+function parts(all) { return all.filter(m => !TABS.includes(m)); }
+function name(m) { return NAMES[m] ?? m; }
diff --git a/desktop/modules/deckit/README.md b/desktop/modules/deckit/README.md
index 51aed37..ba4f4db 100644
--- a/desktop/modules/deckit/README.md
+++ b/desktop/modules/deckit/README.md
@@ -5,11 +5,14 @@ tablet dashboard, its own repo): whether it starts at login, and its
`~/.config/deck-it/config.toml`.
- General (`DeckItModule`, `DeckItGeneralPage`): the config path, Start
- (start at login, Wi-Fi address), Display and Advanced (ports, Hyprland
- config, fallback icon theme). Its header carries deck-it's state and
+ (start at login, Wi-Fi address), Display, Tabs (the tablet's tabs) and
+ Advanced (ports, Hyprland config, fallback icon theme). Its header carries deck-it's state and
Restart.
-- Dashboard (`DeckItDashboardModule`, `DeckItDashboardPage`): the Modules
- toggles, the dashboard's action icons, and Hardware.
+- Dashboard (`DeckItDashboardModule`, `DeckItDashboardPage`): the
+ Dashboard parts (the modules without a tab), the action icons, and
+ Hardware. `Modules.js` says which of deck-it's `[modules]` are tabs and
+ gives each a readable name; a module it does not list lands with the
+ Dashboard parts.
- Windows (`DeckItWindowsModule`, `DeckItWindowsPage`): the launchers and the
workspaces the Windows tab shows.
- Services (`DeckItServicesModule`, `DeckItServicesPage`): OBS, the LLM