aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/Drawer.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-17 09:55:26 +0200
committerDanilo M. <danix@danix.xyz>2026-10-17 09:55:26 +0200
commitd83b1fb7b1336389d7965af75a88912ff2fafbb8 (patch)
tree7d2f34a3c2e0818560c48d2bb7d8a8c12f6dc874 /desktop/Drawer.qml
parent66049c965139d821747ea76960b1e91316f8110a (diff)
downloadquickshell-d83b1fb7b1336389d7965af75a88912ff2fafbb8.tar.gz
quickshell-d83b1fb7b1336389d7965af75a88912ff2fafbb8.zip
desktop: git config moves to the settings window
The global git config is set once and left alone, which is what the settings window is for. The user row and its page stay in the drawer; "More git settings" there now closes the drawer and opens git in the window: Drawer.show hands any settings module to the window, so every deep link, IPC included, lands in the right place. Git was the only user of Module.up, the page back() returned to, so up goes with it and back from a drawer page is always the grid. Also gives autostart its rocket glyph, which the first commit wrote as an empty string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/Drawer.qml')
-rw-r--r--desktop/Drawer.qml16
1 files changed, 13 insertions, 3 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();
}