From 807c761ed017f41c365ae64e89080ef346b70f39 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 12 May 2026 08:28:10 +0200 Subject: [PATCH] qs: fix some manual hyprland dispatches --- .../ii/modules/common/panels/lock/LockScreen.qml | 2 +- dots/.config/quickshell/ii/modules/ii/lock/Lock.qml | 8 ++++---- .../quickshell/ii/modules/ii/sidebarLeft/SidebarLeft.qml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/panels/lock/LockScreen.qml b/dots/.config/quickshell/ii/modules/common/panels/lock/LockScreen.qml index 5a1b24d7e..b5465fa64 100644 --- a/dots/.config/quickshell/ii/modules/common/panels/lock/LockScreen.qml +++ b/dots/.config/quickshell/ii/modules/common/panels/lock/LockScreen.qml @@ -76,7 +76,7 @@ Scope { GlobalStates.screenLocked = false; // Refocus last focused window on unlock (hack) - Quickshell.execDetached(["bash", "-c", `sleep 0.2; hyprctl --batch "dispatch togglespecialworkspace; dispatch togglespecialworkspace"`]) + Quickshell.execDetached(["bash", "-c", `sleep 0.2; hyprctl dispatch 'hl.dsp.workspace.toggle_special("special")'; hyprctl dispatch 'hl.dsp.workspace.toggle_special("special")'`]) // Reset lockContext.reset(); diff --git a/dots/.config/quickshell/ii/modules/ii/lock/Lock.qml b/dots/.config/quickshell/ii/modules/ii/lock/Lock.qml index 26d3e57ab..713fcd5ec 100644 --- a/dots/.config/quickshell/ii/modules/ii/lock/Lock.qml +++ b/dots/.config/quickshell/ii/modules/ii/lock/Lock.qml @@ -24,11 +24,11 @@ LockScreen { var monName = Quickshell.screens[j].name var wsId = root.savedWorkspaces[monName] if (wsId !== undefined) { - batch += "dispatch focusmonitor " + monName + "; dispatch workspace " + wsId + "; " + batch += `hyprctl dispatch 'hl.dsp.focus({monitor="${monName}"})'; hyprctl dispatch 'hl.dsp.focus({workspace=${wsId}})';` } } if (batch.length > 0) { - Quickshell.execDetached(["hyprctl", "--batch", batch + "reload"]) + Quickshell.execDetached(["bash", "-c", batch]) } } } @@ -53,10 +53,10 @@ LockScreen { } var ws = (mData?.activeWorkspace?.id ?? 1) next[mon] = ws - batch += "dispatch focusmonitor " + mon + "; dispatch workspace " + (2147483647 - ws) + "; " + batch += `hyprctl dispatch 'hl.dsp.focus({monitor="${mon}"})'; hyprctl dispatch 'hl.dsp.focus({workspace=${2147483647 - ws}})';` } root.savedWorkspaces = next - Quickshell.execDetached(["hyprctl", "--batch", batch + "reload"]) + Quickshell.execDetached(["bash", "-c", batch]) } else { restoreTimer.start() } diff --git a/dots/.config/quickshell/ii/modules/ii/sidebarLeft/SidebarLeft.qml b/dots/.config/quickshell/ii/modules/ii/sidebarLeft/SidebarLeft.qml index d58deb3f1..4e01565ca 100644 --- a/dots/.config/quickshell/ii/modules/ii/sidebarLeft/SidebarLeft.qml +++ b/dots/.config/quickshell/ii/modules/ii/sidebarLeft/SidebarLeft.qml @@ -34,7 +34,7 @@ Scope { // Scope running = true; } function doIt2(output) { - command = ["bash", "-c", "hyprctl dispatch movecursor 9999 9999"]; + command = ["bash", "-c", "hyprctl dispatch 'hl.dsp.cursor.move({x=9999,y=9999})'"]; hook = () => { doIt3(); } @@ -42,7 +42,7 @@ Scope { // Scope } function doIt3(output) { root.pin = !root.pin; - command = ["bash", "-c", `sleep 0.01; hyprctl dispatch movecursor ${cursorX} ${cursorY}`]; + command = ["bash", "-c", `sleep 0.01; hyprctl dispatch 'hl.dsp.cursor.move({x=${cursorX},y=${cursorY}})'`]; hook = null running = true; }