nixos-configs/modules/hyprland/inputs.nix

54 lines
1.2 KiB
Nix
Raw Normal View History

{
lib,
osConfig,
...
}: let
2024-02-09 17:18:07 -05:00
inherit (lib) genAttrs optionals;
inherit (osConfig.services.xserver) xkb;
inherit (osConfig.vars) mainMonitor;
2024-02-09 17:18:07 -05:00
nagaProNames = [
# Wireless
"device:razer-razer-naga-pro"
# Wired (it always changes)
"device:razer-razer-naga-pro-1"
"device:razer-naga-pro"
"device:razer-naga-pro-1"
"device:razer-naga-pro-2"
"device:razer-naga-pro-3"
];
nagaConf = {
sensitivity = 0;
};
in {
wayland.windowManager.hyprland = {
2024-02-09 17:18:07 -05:00
settings =
(genAttrs nagaProNames (n: nagaConf))
// {
input = {
kb_layout = xkb.layout;
kb_variant = xkb.variant;
follow_mouse = true;
accel_profile = "flat";
2024-02-09 17:18:07 -05:00
touchpad = {
natural_scroll = true;
disable_while_typing = false;
};
};
2024-02-16 22:02:12 -05:00
bind = [
",XF86AudioPlay, exec, playerctl play-pause"
",XF86AudioStop, exec, playerctl stop"
",XF86AudioNext, exec, playerctl next"
",XF86AudioPrev, exec, playerctl previous"
];
2024-02-09 17:18:07 -05:00
exec-once =
optionals (! isNull mainMonitor)
["hyprctl dispatch focusmonitor ${mainMonitor}"];
};
};
}