From 363e1d876492a26a1b7d5261ac28aba94f323d08 Mon Sep 17 00:00:00 2001 From: Viktor Pocedulic Date: Wed, 14 Feb 2024 16:24:46 +0100 Subject: input: enable configuring of trackpoint devices --- src/input.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index d59b020f..080ed03d 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1622,6 +1622,18 @@ pub fn apply_libinput_settings(config: &niri_config::Input, device: &mut input:: let _ = device.config_accel_set_profile(default); } } + + if is_trackpoint { + let c = &config.trackpoint; + let _ = device.config_scroll_set_natural_scroll_enabled(c.natural_scroll); + let _ = device.config_accel_set_speed(c.accel_speed); + + if let Some(accel_profile) = c.accel_profile { + let _ = device.config_accel_set_profile(accel_profile.into()); + } else if let Some(default) = device.config_accel_default_profile() { + let _ = device.config_accel_set_profile(default); + } + } } #[cfg(test)] -- cgit