2024-06-15 01:40:26 -04:00
|
|
|
{osConfig, ...}: let
|
2024-02-05 09:56:42 -05:00
|
|
|
inherit (osConfig.services.xserver) xkb;
|
|
|
|
inherit (osConfig.vars) mainMonitor;
|
|
|
|
|
2024-04-20 13:42:51 -04:00
|
|
|
miceNames = [
|
2024-05-01 10:21:28 -04:00
|
|
|
"logitech-g502-x"
|
2024-04-20 13:42:51 -04:00
|
|
|
"logitech-g502-hero-gaming-mouse"
|
2024-02-09 17:18:07 -05:00
|
|
|
];
|
2024-06-15 01:40:26 -04:00
|
|
|
mkConf = name: {
|
2024-02-19 09:53:55 -05:00
|
|
|
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-06-15 01:40:26 -04:00
|
|
|
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
|
|
|
|
2024-02-19 09:53:55 -05:00
|
|
|
input = {
|
2024-06-15 01:40:26 -04:00
|
|
|
# Keyboard
|
2024-02-19 09:53:55 -05:00
|
|
|
kb_layout = xkb.layout;
|
|
|
|
kb_variant = xkb.variant;
|
2024-06-15 01:40:26 -04:00
|
|
|
numlock_by_default = true;
|
|
|
|
repeat_rate = 100;
|
|
|
|
|
|
|
|
# Mouse
|
2024-02-19 09:53:55 -05:00
|
|
|
follow_mouse = true;
|
|
|
|
|
2024-06-15 01:40:26 -04:00
|
|
|
# Touchpad
|
2024-02-19 09:53:55 -05:00
|
|
|
touchpad = {
|
|
|
|
natural_scroll = true;
|
|
|
|
disable_while_typing = false;
|
2024-06-15 01:40:26 -04:00
|
|
|
drag_lock = true;
|
|
|
|
tap-and-drag = true;
|
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-06-15 01:40:26 -04:00
|
|
|
gestures = {
|
|
|
|
workspace_swipe = true;
|
|
|
|
workspace_swipe_fingers = 3;
|
|
|
|
workspace_swipe_touch = true;
|
|
|
|
workspace_swipe_cancel_ratio = 0.15;
|
|
|
|
};
|
|
|
|
|
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-05 09:56:42 -05:00
|
|
|
};
|
|
|
|
}
|