nixos-configs/modules/hyprland/inputs.nix

63 lines
1.4 KiB
Nix
Raw Normal View History

{osConfig, ...}: let
inherit (osConfig.services.xserver) xkb;
inherit (osConfig.vars) mainMonitor;
2024-04-20 13:42:51 -04:00
miceNames = [
"logitech-g502-x"
2024-04-20 13:42:51 -04:00
"logitech-g502-hero-gaming-mouse"
2024-02-09 17:18:07 -05:00
];
mkConf = name: {
inherit name;
2024-02-09 17:18:07 -05:00
sensitivity = 0;
accel_profile = "flat";
};
in {
wayland.windowManager.hyprland = {
settings = {
device = map (d: (mkConf d)) miceNames;
cursor = {
no_hardware_cursors = osConfig.nvidia.enable;
hide_on_touch = true;
default_monitor =
if mainMonitor != null
then mainMonitor
else "";
};
2024-02-21 00:20:41 -05:00
input = {
# Keyboard
kb_layout = xkb.layout;
kb_variant = xkb.variant;
numlock_by_default = true;
2024-06-15 22:51:36 -04:00
repeat_rate = 25;
# Mouse
follow_mouse = true;
# Touchpad
touchpad = {
natural_scroll = true;
disable_while_typing = false;
drag_lock = true;
tap-and-drag = true;
};
};
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = 3;
workspace_swipe_touch = true;
workspace_swipe_cancel_ratio = 0.15;
};
bind = [
",XF86AudioPlay, exec, playerctl play-pause"
",XF86AudioStop, exec, playerctl stop"
",XF86AudioNext, exec, playerctl next"
",XF86AudioPrev, exec, playerctl previous"
];
};
};
}