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;
|
GlobalStates.screenLocked = false;
|
||||||
|
|
||||||
// Refocus last focused window on unlock (hack)
|
// 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
|
// Reset
|
||||||
lockContext.reset();
|
lockContext.reset();
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ LockScreen {
|
|||||||
var monName = Quickshell.screens[j].name
|
var monName = Quickshell.screens[j].name
|
||||||
var wsId = root.savedWorkspaces[monName]
|
var wsId = root.savedWorkspaces[monName]
|
||||||
if (wsId !== undefined) {
|
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) {
|
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)
|
var ws = (mData?.activeWorkspace?.id ?? 1)
|
||||||
next[mon] = ws
|
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
|
root.savedWorkspaces = next
|
||||||
Quickshell.execDetached(["hyprctl", "--batch", batch + "reload"])
|
Quickshell.execDetached(["bash", "-c", batch])
|
||||||
} else {
|
} else {
|
||||||
restoreTimer.start()
|
restoreTimer.start()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Scope { // Scope
|
|||||||
running = true;
|
running = true;
|
||||||
}
|
}
|
||||||
function doIt2(output) {
|
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 = () => {
|
hook = () => {
|
||||||
doIt3();
|
doIt3();
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ Scope { // Scope
|
|||||||
}
|
}
|
||||||
function doIt3(output) {
|
function doIt3(output) {
|
||||||
root.pin = !root.pin;
|
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
|
hook = null
|
||||||
running = true;
|
running = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user