From 93e2f4ebbefc13028e04f19a07e758a626194915 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 12 Sep 2026 18:43:43 +0200 Subject: 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 Claude-Session: https://claude.ai/code/session_01SYg4wYHq5XNbiVmMeKRb1S --- window-switcher/Switcher.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'window-switcher') 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; } -- cgit v1.2.3