diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-10 20:09:46 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-10 20:09:46 +0100 |
| commit | cd7035be76c82c15d172a6827c3c8f81df723424 (patch) | |
| tree | 0daa73c531e81a53b872877ee060e3d9d1403d8d /desktop/modules/deckit/DeckItGeneralPage.qml | |
| parent | 8a84306ff64deb542ef8de60cc30d490c5e25aff (diff) | |
| download | quickshell-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/DeckItGeneralPage.qml')
| -rw-r--r-- | desktop/modules/deckit/DeckItGeneralPage.qml | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/desktop/modules/deckit/DeckItGeneralPage.qml b/desktop/modules/deckit/DeckItGeneralPage.qml new file mode 100644 index 0000000..358574f --- /dev/null +++ b/desktop/modules/deckit/DeckItGeneralPage.qml @@ -0,0 +1,89 @@ +// 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 Quickshell +import QtQuick +import "../.." +import "../qtmaildir" + +// 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 +// pages; an emptied field unsets the key, so deck-it's shipped default (the +// placeholder) applies. +Column { + id: col + spacing: 6 + readonly property var st: DeckIt.store + function def(section, key) { return col.st.fallback(section, key); } + + Small { text: DeckIt.path + ", only the keys that differ from deck-it's defaults. Saved changes apply when deck-it restarts." } + Small { visible: DeckIt.defaultsError !== ""; color: Theme.red; text: DeckIt.defaultsError } + Component.onCompleted: DeckIt.watchers++ + Component.onDestruction: DeckIt.watchers-- + + Heading { text: "Start" } + Item { + objectName: "autostart/" + width: col.width + height: 34 + Text { + id: asLabel + anchors { left: parent.left; verticalCenter: parent.verticalCenter } + width: 160 + text: "Start at login" + color: Theme.subtext + font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 3 } + } + Switch { + id: asSwitch + anchors { left: asLabel.right; leftMargin: 8; verticalCenter: parent.verticalCenter } + checked: DeckIt.autostart + onToggled: on => DeckIt.setAutostart(on) + } + Text { + anchors { left: asSwitch.right; leftMargin: 10; verticalCenter: parent.verticalCenter } + text: DeckIt.autostartCmd + ", in autostart.lua; applies at next login" + color: Theme.subtext + font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } + } + } + Small { visible: DeckIt.autostartError !== ""; color: Theme.red; text: DeckIt.autostartError } + Setting { store: col.st; section: "wifi"; key: "address"; label: "Wi-Fi address" + placeholder: "ip:port" + hint: "From the tablet's Wireless debugging screen. The port changes whenever it is switched on; empty tries the last address, then mDNS." } + + Heading { text: "Display" } + BoolSetting { store: col.st; section: "display"; key: "enabled"; label: "Second display" + fallback: col.def("display", "enabled") ?? true + hint: "a headless monitor streamed to AVNC; off runs the dashboard alone" } + Setting { store: col.st; section: "display"; key: "resolution"; label: "Resolution" + placeholder: col.st.placeholder("display", "resolution"); hint: "WIDTHxHEIGHT, or auto to ask the tablet." } + Setting { store: col.st; section: "display"; key: "position"; label: "Position" + placeholder: col.st.placeholder("display", "position") + hint: "auto-below centres it under the first monitor; any Hyprland position works." } + Setting { store: col.st; section: "display"; key: "scale"; label: "Scale"; kind: "float"; min: 0.25; max: 4 + placeholder: col.st.placeholder("display", "scale") } + Setting { store: col.st; section: "display"; key: "refresh"; label: "Refresh"; kind: "int"; min: 1; max: 240 + placeholder: col.st.placeholder("display", "refresh") } + Setting { store: col.st; section: "display"; key: "name"; label: "Output name" + placeholder: col.st.placeholder("display", "name") } + + 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." } + Setting { store: col.st; section: "ports"; key: "display"; label: "Display port"; kind: "int"; min: 1024; max: 65535 + placeholder: col.st.placeholder("ports", "display") } + ChoiceSetting { store: col.st; section: ""; key: "hyprland"; label: "Hyprland config" + fallbackLabel: "Default (" + (col.def("", "hyprland") ?? "auto") + ")" + options: [{ value: "auto", label: "auto" }, { value: "lua", label: "lua" }, { value: "classic", label: "classic" }] } + Setting { store: col.st; section: "icons"; key: "theme"; label: "Fallback icon theme" + placeholder: col.st.placeholder("icons", "theme"); hint: "Used only when keystone sets no icon theme." } +} |
