Skip to content

Commit f9b5d2c

Browse files
committed
refactor(hypr): use local usingLua over Hyprland.usingLua
1 parent a498253 commit f9b5d2c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

services/Hypr.qml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ Singleton {
5858
if (lastSpecialWorkspace) {
5959
const workspace = workspaces.values.find(w => w.name === lastSpecialWorkspace);
6060
if (workspace && workspace.lastIpcObject.windows > 0) {
61-
dispatch(Hyprland.usingLua ? `hl.dsp.focus({ workspace = "${lastSpecialWorkspace}" })` : `workspace ${lastSpecialWorkspace}`);
61+
dispatch(usingLua ? `hl.dsp.focus({ workspace = "${lastSpecialWorkspace}" })` : `workspace ${lastSpecialWorkspace}`);
6262
return;
6363
}
6464
}
65-
dispatch(Hyprland.usingLua ? `hl.dsp.focus({ workspace = "${openSpecials[0].name}" })` : `workspace ${openSpecials[0].name}`);
65+
dispatch(usingLua ? `hl.dsp.focus({ workspace = "${openSpecials[0].name}" })` : `workspace ${openSpecials[0].name}`);
6666
return;
6767
}
6868

@@ -76,7 +76,7 @@ Singleton {
7676
nextIndex = (currentIndex - 1 + openSpecials.length) % openSpecials.length;
7777
}
7878

79-
dispatch(Hyprland.usingLua ? `hl.dsp.focus({ workspace = "${openSpecials[nextIndex].name}" })` : `workspace ${openSpecials[nextIndex].name}`);
79+
dispatch(usingLua ? `hl.dsp.focus({ workspace = "${openSpecials[nextIndex].name}" })` : `workspace ${openSpecials[nextIndex].name}`);
8080
}
8181

8282
function monitorNames(): list<string> {
@@ -88,7 +88,7 @@ Singleton {
8888
}
8989

9090
function reloadDynamicConfs(): void {
91-
if (Hyprland.usingLua) {
91+
if (usingLua) {
9292
extras.batchMessage([`eval hl.bind("Caps_Lock", hl.dsp.global("caelestia:refreshDevices"), { locked = true, non_consuming = true, ignore_mods = true, release = true})`, `eval hl.bind("Num_Lock", hl.dsp.global("caelestia:refreshDevices"), { locked = true, non_consuming = true, ignore_mods = true, release = true})`]);
9393
} else {
9494
extras.batchMessage(["keyword bindlni ,Caps_Lock,global,caelestia:refreshDevices", "keyword bindlni ,Num_Lock,global,caelestia:refreshDevices"]);

0 commit comments

Comments
 (0)