aboutsummaryrefslogtreecommitdiffstats
path: root/window-switcher
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-12 18:43:43 +0200
committerDanilo M. <danix@danix.xyz>2026-09-12 18:43:43 +0200
commit93e2f4ebbefc13028e04f19a07e758a626194915 (patch)
treedc114eeb5e7e92a0c163e37af52156a6a570acbd /window-switcher
parent485c62c5c3549b66cc9890e371553ad101042b41 (diff)
downloadquickshell-93e2f4ebbefc13028e04f19a07e758a626194915.tar.gz
quickshell-93e2f4ebbefc13028e04f19a07e758a626194915.zip
fix(window-switcher): pick the screen the way the other components do
The screen was found by a name written inline, falling back to null. The other three panels all take a monitor property and fall back to screens[0], so this now does too: a machine without a DP-1 gets its first monitor rather than a null screen, and the name is in one place if it ever needs changing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SYg4wYHq5XNbiVmMeKRb1S
Diffstat (limited to 'window-switcher')
-rw-r--r--window-switcher/Switcher.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/window-switcher/Switcher.qml b/window-switcher/Switcher.qml
index 762c190..d989e57 100644
--- a/window-switcher/Switcher.qml
+++ b/window-switcher/Switcher.qml
@@ -17,7 +17,10 @@ Scope {
id: root
property bool open: false
- readonly property var screenObj: Quickshell.screens.find(s => s.name === "DP-1") ?? null
+ property string monitor: "DP-1"
+
+ readonly property var screenObj:
+ Quickshell.screens.find(s => s.name === root.monitor) ?? Quickshell.screens[0]
function toggle() { root.open = !root.open; }
function close() { root.open = false; }