mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
qs: fix some manual hyprland dispatches
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user