1
1
Fork 0

nix: unify hyprland devices

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-11-27 16:12:59 -06:00
parent 57985b98a5
commit 72f885ed26
Signed by: myned
GPG key ID: C7224454F7881A34

View file

@ -247,53 +247,37 @@ in {
# https://wiki.hyprland.org/Configuring/Variables/#custom-accel-profiles # https://wiki.hyprland.org/Configuring/Variables/#custom-accel-profiles
# https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html#the-custom-acceleration-profile # https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html#the-custom-acceleration-profile
#?? custom <STEP> <POINTS...> #?? custom <STEP> <POINTS...>
# TODO: Combine same devices device = let
# FIXME: Hotplugging may result in different id # Combine duplicate devices into one attrset
device = [ #?? (devices ["NAME"] {ATTRS})
{ devices = names: attrs: map (name: {inherit name;} // attrs) names;
name = "kensington-orbit-wireless-tb-mouse"; in
accel_profile = "adaptive"; flatten [
sensitivity = -0.6; (devices ["kensington-orbit-wireless-tb-mouse" "orbit-bt5.0-mouse"] {
left_handed = true; accel_profile = "adaptive";
middle_button_emulation = true; left_handed = true;
natural_scroll = true; middle_button_emulation = true;
} natural_scroll = true;
sensitivity = -0.6;
})
{ (devices ["logitech-m570"] {
name = "orbit-bt5.0-mouse"; accel_profile = "custom 1 0 1 3";
accel_profile = "adaptive"; sensitivity = -0.2;
sensitivity = -0.6; })
left_handed = true;
middle_button_emulation = true;
natural_scroll = true;
}
{ (devices ["nordic-2.4g-wireless-receiver-mouse" "protoarc-em11-nl-mouse"] {
name = "logitech-m570"; sensitivity = -0.7;
accel_profile = "custom 1 0 1 3"; })
sensitivity = -0.2;
}
{ (devices ["razer-razer-viper-ultimate" "razer-razer-viper-ultimate-dongle"] {
name = "nordic-2.4g-wireless-receiver-mouse"; sensitivity = -0.7;
sensitivity = -0.7; })
}
{ (devices ["wireless-controller-touchpad"] {
name = "protoarc-em11-nl-mouse"; enabled = false;
sensitivity = -0.7; })
} ];
{
name = "razer-razer-viper-ultimate-dongle";
sensitivity = -0.7;
}
{
name = "wireless-controller-touchpad";
enabled = false;
}
];
}; };
}; };
} }