aboutsummaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/Drawer.qml16
-rw-r--r--desktop/Module.qml4
-rw-r--r--desktop/README.md2
-rw-r--r--desktop/modules/autostart/AutostartModule.qml2
-rw-r--r--desktop/modules/git/GitModule.qml7
-rw-r--r--desktop/modules/git/README.md4
-rw-r--r--desktop/modules/user/README.md3
-rw-r--r--desktop/shell.qml1
8 files changed, 23 insertions, 16 deletions
diff --git a/desktop/Drawer.qml b/desktop/Drawer.qml
index 7855823..2151547 100644
--- a/desktop/Drawer.qml
+++ b/desktop/Drawer.qml
@@ -21,6 +21,11 @@ Scope {
// The modules the drawer hosts, in grid order. Set from shell.qml.
property list<QtObject> modules
+ // The settings window, set from shell.qml. A page that lives there is
+ // handed to it rather than shown here (the user page opens git).
+ // Not named `settings`, shell.qml's id for it (it would bind to itself).
+ property var settingsWindow: null
+
// Waybar runs on this screen and the launcher sits at its left end, so
// the drawer belongs here. Falls back to the first screen when this
// monitor is not connected, so the drawer is never invisible.
@@ -62,6 +67,11 @@ Scope {
}
function show(name) {
+ if (root.settingsWindow && root.modules.some(m => m.name === name && m.settings)) {
+ root.close();
+ root.settingsWindow.show(name);
+ return;
+ }
// Deep-linking to a page must leave the history view, or both loaders
// stay active and the later-declared history loader paints on top.
root.history = false;
@@ -69,12 +79,12 @@ Scope {
root.open = true;
}
- // One step out: history, then a page (to its module's `up`, the grid by
- // default), then the drawer itself. Escape, the mouse's back button and
+ // One step out: history, then a page (to the grid), then the drawer
+ // itself. Escape, the mouse's back button and
// a page's back arrow.
function back() {
if (root.history) root.history = false;
- else if (root.page) root.page = root.current?.up ?? "";
+ else if (root.page) root.page = "";
else root.close();
}
diff --git a/desktop/Module.qml b/desktop/Module.qml
index 64fb69f..5217d3f 100644
--- a/desktop/Module.qml
+++ b/desktop/Module.qml
@@ -46,10 +46,6 @@ QtObject {
// some other way: the user page opens from the drawer's header row.
property bool tiled: !settings
- // The page back() returns to from this module's page. Empty is the grid.
- // The git page sets "user", the page it is opened from.
- property string up: ""
-
// Rendered inside the tile, below the icon: a short state line. Null for
// a tile that says nothing beyond its label.
property Component tileContent: null
diff --git a/desktop/README.md b/desktop/README.md
index 3fd1cac..39a0275 100644
--- a/desktop/README.md
+++ b/desktop/README.md
@@ -50,7 +50,7 @@ gear tile opens it, and so does IPC:
modules/perf/ CPU, temperatures, GPU, network, disks, ~/.cache
modules/user/ the greeting row and the user's details page
modules/clipboard/ cliphist history: search, copy, delete, clear all
- modules/git/ the global git config, opened from the user page
+ modules/git/ the global git config, in the settings window
modules/autostart/ Hyprland's autostart.lua, in the settings window
Sound, mail, vm, network, bluetooth, kdeconnect and ai each carry their own README.
diff --git a/desktop/modules/autostart/AutostartModule.qml b/desktop/modules/autostart/AutostartModule.qml
index bba8aff..db11b28 100644
--- a/desktop/modules/autostart/AutostartModule.qml
+++ b/desktop/modules/autostart/AutostartModule.qml
@@ -18,7 +18,7 @@ Module {
name: "autostart"
label: "Autostart"
// nf-fa-rocket, present in Inconsolata Nerd Font.
- icon: ""
+ icon: "\uf135"
settings: true
page: Component {
diff --git a/desktop/modules/git/GitModule.qml b/desktop/modules/git/GitModule.qml
index 7b1cecf..8a2b6dd 100644
--- a/desktop/modules/git/GitModule.qml
+++ b/desktop/modules/git/GitModule.qml
@@ -12,16 +12,15 @@
import QtQuick
import "../.."
-// The global git config. No tile: the user page's Git section opens it, and
-// back returns there.
+// The global git config, in the settings window: set once and left alone.
+// The user page's "More git settings" opens it there.
Module {
id: gm
name: "git"
label: "Git config"
// nf-dev-git, present in Inconsolata Nerd Font.
icon: ""
- tiled: false
- up: "user"
+ settings: true
page: Component {
Page {
diff --git a/desktop/modules/git/README.md b/desktop/modules/git/README.md
index 65f2a8a..08ed5ea 100644
--- a/desktop/modules/git/README.md
+++ b/desktop/modules/git/README.md
@@ -1,7 +1,7 @@
# git
-The global git config (`~/.gitconfig`), every key, reached from the user
-page's "More git settings" button. Back returns to the user page.
+The global git config (`~/.gitconfig`), every key, in the settings window,
+also reached from the user page's "More git settings" button.
One row per value, grouped by section in file order, so a key set several
times shows several rows. Enter saves a row, Escape undoes an edit, Remove
diff --git a/desktop/modules/user/README.md b/desktop/modules/user/README.md
index 7178838..8f3e8f1 100644
--- a/desktop/modules/user/README.md
+++ b/desktop/modules/user/README.md
@@ -16,7 +16,8 @@ what is typed is sent to `nominatim.openstreetmap.org`, 1s after typing
stops and from three characters, per its usage policy. Up/Down, Enter and
Escape work the list. Offline, the field is plain text. The Git section
shows the name and email git will get, read-only, and the signing key;
-"More git settings" opens the full global git config (`../git/`).
+"More git settings" closes the drawer and opens the full global git config
+(`../git/`) in the settings window.
The greeting is picked at random on each drawer open, never the same one
twice running, from `~/.config/quickshell/greetings`: one per line, `{user}`
diff --git a/desktop/shell.qml b/desktop/shell.qml
index bceb568..0d56e87 100644
--- a/desktop/shell.qml
+++ b/desktop/shell.qml
@@ -59,6 +59,7 @@ ShellRoot {
Drawer {
id: drawer
+ settingsWindow: settings
modules: [
SoundModule { id: soundModule },
NetworkModule {},