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