aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--niri-config/src/lib.rs3
-rw-r--r--resources/default-config.kdl1
-rw-r--r--src/input/mod.rs1
-rw-r--r--wiki/Configuration:-Input.md2
4 files changed, 7 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs
index ddd3003d..b863b206 100644
--- a/niri-config/src/lib.rs
+++ b/niri-config/src/lib.rs
@@ -184,6 +184,8 @@ pub struct Touchpad {
#[knuffel(child)]
pub dwtp: bool,
#[knuffel(child)]
+ pub drag_lock: bool,
+ #[knuffel(child)]
pub natural_scroll: bool,
#[knuffel(child, unwrap(argument, str))]
pub click_method: Option<ClickMethod>,
@@ -3600,6 +3602,7 @@ mod tests {
tap: true,
dwt: true,
dwtp: true,
+ drag_lock: false,
click_method: Some(ClickMethod::Clickfinger),
natural_scroll: false,
accel_speed: 0.2,
diff --git a/resources/default-config.kdl b/resources/default-config.kdl
index a3560ab8..ad3e1b2b 100644
--- a/resources/default-config.kdl
+++ b/resources/default-config.kdl
@@ -25,6 +25,7 @@ input {
tap
// dwt
// dwtp
+ // drag-lock
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
diff --git a/src/input/mod.rs b/src/input/mod.rs
index aea4b409..b6eb0e3d 100644
--- a/src/input/mod.rs
+++ b/src/input/mod.rs
@@ -3218,6 +3218,7 @@ pub fn apply_libinput_settings(config: &niri_config::Input, device: &mut input::
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_tap_set_drag_lock_enabled(c.drag_lock);
let _ = device.config_scroll_set_natural_scroll_enabled(c.natural_scroll);
let _ = device.config_accel_set_speed(c.accel_speed);
let _ = device.config_left_handed_set(c.left_handed);
diff --git a/wiki/Configuration:-Input.md b/wiki/Configuration:-Input.md
index cbb8c2d2..8aac7848 100644
--- a/wiki/Configuration:-Input.md
+++ b/wiki/Configuration:-Input.md
@@ -30,6 +30,7 @@ input {
tap
// dwt
// dwtp
+ // drag-lock
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
@@ -181,6 +182,7 @@ Settings specific to `touchpad`s:
- `tap`: tap-to-click.
- `dwt`: disable-when-typing.
- `dwtp`: disable-when-trackpointing.
+- `drag-lock`: if set, lifting the finger off for a short time while dragging will not drop the dragged item. See the [libinput documentation](https://wayland.freedesktop.org/libinput/doc/latest/tapping.html#tap-and-drag).
- `tap-button-map`: can be `left-right-middle` or `left-middle-right`, controls which button corresponds to a two-finger tap and a three-finger tap.
- `click-method`: can be `button-areas` or `clickfinger`, changes the [click method](https://wayland.freedesktop.org/libinput/doc/latest/clickpad-softbuttons.html).
- `disabled-on-external-mouse`: do not send events while external pointer device is plugged in.