diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-02-02 21:48:14 +0530 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-02-02 21:48:14 +0530 |
| commit | 317db624e49c569a9042d314e72368d5617af21b (patch) | |
| tree | 8e04d5838c325cabed425addc232abe9ea59b036 | |
| parent | 4898344e5fadfe6fcbcdfb093ff1163494fe76e4 (diff) | |
natural scroll only for trackpad
| -rw-r--r-- | config.def.h | 2 | ||||
| -rw-r--r-- | dwl.c | 5 | ||||
| -rw-r--r-- | patches/naturalscrolltrackpad.patch | 27 |
3 files changed, 30 insertions, 4 deletions
diff --git a/config.def.h b/config.def.h index 201cb1d..ac696d2 100644 --- a/config.def.h +++ b/config.def.h @@ -72,7 +72,7 @@ static const int repeat_delay = 600; static const int tap_to_click = 1; static const int tap_and_drag = 1; static const int drag_lock = 1; -static const int natural_scrolling = 0; +static const int natural_scrolling = 1; static const int disable_while_typing = 1; static const int left_handed = 0; static const int middle_button_emulation = 1; @@ -1074,11 +1074,10 @@ createpointer(struct wlr_pointer *pointer) libinput_device_config_tap_set_drag_enabled(device, tap_and_drag); libinput_device_config_tap_set_drag_lock_enabled(device, drag_lock); libinput_device_config_tap_set_button_map(device, button_map); + if (libinput_device_config_scroll_has_natural_scroll(device)) + libinput_device_config_scroll_set_natural_scroll_enabled(device, natural_scrolling); } - if (libinput_device_config_scroll_has_natural_scroll(device)) - libinput_device_config_scroll_set_natural_scroll_enabled(device, natural_scrolling); - if (libinput_device_config_dwt_is_available(device)) libinput_device_config_dwt_set_enabled(device, disable_while_typing); diff --git a/patches/naturalscrolltrackpad.patch b/patches/naturalscrolltrackpad.patch new file mode 100644 index 0000000..5cd3742 --- /dev/null +++ b/patches/naturalscrolltrackpad.patch @@ -0,0 +1,27 @@ +From 8b523453aefdc9d2920c8f9a52de009da251fbb0 Mon Sep 17 00:00:00 2001 +From: neuromagus <neuromagus@mail.ru> +Date: Sun, 7 Jan 2024 05:11:24 +0300 +Subject: [PATCH] apply patch naturalscrolltrackpad + +--- + dwl.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/dwl.c b/dwl.c +index 4d19357..26f394b 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -974,11 +974,10 @@ createpointer(struct wlr_pointer *pointer) + libinput_device_config_tap_set_drag_enabled(device, tap_and_drag); + libinput_device_config_tap_set_drag_lock_enabled(device, drag_lock); + libinput_device_config_tap_set_button_map(device, button_map); ++ if (libinput_device_config_scroll_has_natural_scroll(device)) ++ libinput_device_config_scroll_set_natural_scroll_enabled(device, natural_scrolling); + } + +- if (libinput_device_config_scroll_has_natural_scroll(device)) +- libinput_device_config_scroll_set_natural_scroll_enabled(device, natural_scrolling); +- + if (libinput_device_config_dwt_is_available(device)) + libinput_device_config_dwt_set_enabled(device, disable_while_typing); + |
