diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-03 08:20:15 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-06 09:54:46 +0400 |
| commit | baa6263cbe72562b26c37514385ddeb4247feb3e (patch) | |
| tree | 0b715cee6bf94b2da16e529b04f4914fb00e550b | |
| parent | 795da53d53e05fe6421ea2ef0b7547a3d87924c6 (diff) | |
| download | niri-baa6263cbe72562b26c37514385ddeb4247feb3e.tar.gz niri-baa6263cbe72562b26c37514385ddeb4247feb3e.tar.bz2 niri-baa6263cbe72562b26c37514385ddeb4247feb3e.zip | |
Bump libinput to 1.21, add dwtp flag
| -rw-r--r-- | Cargo.lock | 2 | ||||
| -rw-r--r-- | Cargo.toml | 1 | ||||
| -rw-r--r-- | niri-config/src/lib.rs | 4 | ||||
| -rw-r--r-- | resources/default-config.kdl | 1 | ||||
| -rw-r--r-- | src/input.rs | 1 |
5 files changed, 9 insertions, 0 deletions
@@ -1585,6 +1585,7 @@ dependencies = [ "input-sys", "io-lifetimes 1.0.11", "libc", + "log", "udev", ] @@ -2057,6 +2058,7 @@ dependencies = [ "directories", "futures-util", "git-version", + "input", "keyframe", "libc", "log", @@ -50,6 +50,7 @@ clap = { version = "4.4.18", features = ["derive", "string"] } directories = "5.0.1" futures-util = { version = "0.3.30", default-features = false, features = ["std", "io"] } git-version = "0.3.9" +input = { version = "0.9.0", features = ["libinput_1_21"] } keyframe = { version = "1.1.1", default-features = false } libc = "0.2.153" log = { version = "0.4.20", features = ["max_level_trace", "release_max_level_debug"] } diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index d8ccad58..bd8b6438 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -124,6 +124,8 @@ pub struct Touchpad { #[knuffel(child)] pub dwt: bool, #[knuffel(child)] + pub dwtp: bool, + #[knuffel(child)] pub natural_scroll: bool, #[knuffel(child, unwrap(argument), default)] pub accel_speed: f64, @@ -765,6 +767,7 @@ mod tests { touchpad { tap dwt + dwtp accel-speed 0.2 accel-profile "flat" tap-button-map "left-middle-right" @@ -867,6 +870,7 @@ mod tests { touchpad: Touchpad { tap: true, dwt: true, + dwtp: true, natural_scroll: false, accel_speed: 0.2, accel_profile: Some(AccelProfile::Flat), diff --git a/resources/default-config.kdl b/resources/default-config.kdl index 5ec5eb35..268f3fd8 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -28,6 +28,7 @@ input { touchpad { tap // dwt + // dwtp natural-scroll // accel-speed 0.2 // accel-profile "flat" diff --git a/src/input.rs b/src/input.rs index 0371e933..387969f3 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1522,6 +1522,7 @@ pub fn apply_libinput_settings(config: &niri_config::Input, device: &mut input:: let c = &config.touchpad; let _ = device.config_tap_set_enabled(c.tap); let _ = device.config_dwt_set_enabled(c.dwt); + let _ = device.config_dwtp_set_enabled(c.dwtp); let _ = device.config_scroll_set_natural_scroll_enabled(c.natural_scroll); let _ = device.config_accel_set_speed(c.accel_speed); |
