hyprland: to lua

This commit is contained in:
2026-09-16 19:42:53 +03:00
parent e57dad8746
commit fac73d8508
17 changed files with 527 additions and 449 deletions
+21 -12
View File
@@ -18,6 +18,8 @@
percent="$(${lib.getExe pkgs.brightnessctl} -m | ${lib.getExe' pkgs.coreutils "cut"} -d, -f4 | ${lib.getExe' pkgs.coreutils "tr"} -d '%')"
printf '%s brightness\n' "$percent" > ${wobSocket}
'';
hyprLua = import ./hyprland/lua.nix { inherit lib; };
in {
systemd.user = {
services.wob.Install.WantedBy = lib.mkForce [ ];
@@ -53,16 +55,23 @@ in {
};
};
wayland.windowManager.hyprland.settings = {
bindel = [
", XF86AudioRaiseVolume, exec, ${lib.getExe volumeStep}"
", XF86AudioLowerVolume, exec, ${lib.getExe volumeStep}"
", XF86MonBrightnessUp, exec, ${lib.getExe brightnessStep}"
", XF86MonBrightnessDown, exec, ${lib.getExe brightnessStep}"
];
bind = [
", XF86AudioMute, exec, ${lib.getExe volumeStep} mute"
];
};
wayland.windowManager.hyprland.settings.bind = [
(hyprLua.bindWithFlags "XF86AudioRaiseVolume" (hyprLua.exec "${lib.getExe volumeStep}") {
repeating = true;
locked = true;
})
(hyprLua.bindWithFlags "XF86AudioLowerVolume" (hyprLua.exec "${lib.getExe volumeStep}") {
repeating = true;
locked = true;
})
(hyprLua.bindWithFlags "XF86MonBrightnessUp" (hyprLua.exec "${lib.getExe brightnessStep}") {
repeating = true;
locked = true;
})
(hyprLua.bindWithFlags "XF86MonBrightnessDown" (hyprLua.exec "${lib.getExe brightnessStep}") {
repeating = true;
locked = true;
})
(hyprLua.bind "XF86AudioMute" (hyprLua.exec "${lib.getExe volumeStep} mute"))
];
}