hyprland lua support #91

Merged
zach merged 5 commits from hypr-plugin into main 2026-05-20 14:08:30 +02:00
2 changed files with 31 additions and 9 deletions
Showing only changes of commit b8af60008d - Show all commits
+26 -4
View File
@@ -80,10 +80,32 @@ Singleton {
} }
function reloadHyprRules(): void { function reloadHyprRules(): void {
const barStr = Hyprland.usingLua ? `eval 'hl.layer_rule({ match = { namespace = "ZShell-Bar" }, %1 = true, %2 = true })'` : "keyword layerrule %1 %2, match:namespace ZShell-Bar"; const blur = transparency.enabled ? 1 : 0;
const authStr = Hyprland.usingLua ? `eval 'hl.layer_rule({ match = { namespace = "ZShell-Auth" }, %1 = true, %2 = true })'` : "keyword layerrule %1 %2, match:namespace ZShell-Auth"; const alpha = transparency.base - 0.03;
Hypr.extras.batchMessage([barStr.arg("blur").arg(transparency.enabled ? 1 : 0), barStr.arg("ignore_alpha").arg(transparency.base - 0.03)]);
Hypr.extras.batchMessage([authStr.arg("blur").arg(transparency.enabled ? 1 : 0), authStr.arg("ignore_alpha").arg(transparency.base - 0.03)]); const rules = `
hl.layer_rule({
match = { namespace = "ZShell-Bar" },
blur = ${blur}
})
hl.layer_rule({
match = { namespace = "ZShell-Bar" },
ignore_alpha = ${alpha}
})
hl.layer_rule({
match = { namespace = "ZShell-Auth" },
blur = ${blur}
})
hl.layer_rule({
match = { namespace = "ZShell-Auth" },
ignore_alpha = ${alpha}
})
`;
Hypr.extras.message(`eval ${rules}`);
} }
function setMode(mode: string): void { function setMode(mode: string): void {
+5 -5
View File
@@ -13,11 +13,11 @@ Singleton {
function setHyprConf(): void { function setHyprConf(): void {
Hypr.extras.applyOptions({ Hypr.extras.applyOptions({
"animations:enabled": 0, "animations.enabled": 0,
"decoration:shadow:enabled": 0, "decoration.shadow.enabled": 0,
"decoration:blur:enabled": 0, "decoration.blur.enabled": 0,
"general:border_size": 0, "general.border_size": 0,
"decoration:rounding": 0 "decoration.rounding": 0
}); });
} }