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