Add natural scroll touchpad patch
This commit is contained in:
11
README.org
11
README.org
@@ -9,6 +9,7 @@
|
|||||||
- [[#patches][Patches]]
|
- [[#patches][Patches]]
|
||||||
- [[#attach-top][Attach Top]]
|
- [[#attach-top][Attach Top]]
|
||||||
- [[#auto-start][Auto Start]]
|
- [[#auto-start][Auto Start]]
|
||||||
|
- [[#natural-scroll-trackpad][Natural Scroll Trackpad]]
|
||||||
- [[#restore-monitor][Restore Monitor]]
|
- [[#restore-monitor][Restore Monitor]]
|
||||||
- [[#vanity-gaps][Vanity Gaps]]
|
- [[#vanity-gaps][Vanity Gaps]]
|
||||||
- [[#warp-cursor][Warp Cursor]]
|
- [[#warp-cursor][Warp Cursor]]
|
||||||
@@ -72,6 +73,14 @@ Note: Commands from array are executed using execvp(). So if you need to execute
|
|||||||
#define AUTOSTART_PATCH 1
|
#define AUTOSTART_PATCH 1
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** [[https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/naturalscrolltrackpad][Natural Scroll Trackpad]]
|
||||||
|
|
||||||
|
Set natural scrolling only for trackpads.
|
||||||
|
|
||||||
|
#+BEGIN_SRC c :tangle patches.def.h
|
||||||
|
#define NATURALSCROLLTRACKPAD_PATCH 1
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** [[https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/restore-monitor][Restore Monitor]]
|
** [[https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/restore-monitor][Restore Monitor]]
|
||||||
|
|
||||||
Moves clients to their old output when it is reattached.
|
Moves clients to their old output when it is reattached.
|
||||||
@@ -231,7 +240,7 @@ static const int repeat_delay = 600;
|
|||||||
static const int tap_to_click = 1;
|
static const int tap_to_click = 1;
|
||||||
static const int tap_and_drag = 1;
|
static const int tap_and_drag = 1;
|
||||||
static const int drag_lock = 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 disable_while_typing = 1;
|
||||||
static const int left_handed = 0;
|
static const int left_handed = 0;
|
||||||
static const int middle_button_emulation = 0;
|
static const int middle_button_emulation = 0;
|
||||||
|
2
config.h
2
config.h
@@ -88,7 +88,7 @@ static const int repeat_delay = 600;
|
|||||||
static const int tap_to_click = 1;
|
static const int tap_to_click = 1;
|
||||||
static const int tap_and_drag = 1;
|
static const int tap_and_drag = 1;
|
||||||
static const int drag_lock = 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 disable_while_typing = 1;
|
||||||
static const int left_handed = 0;
|
static const int left_handed = 0;
|
||||||
static const int middle_button_emulation = 0;
|
static const int middle_button_emulation = 0;
|
||||||
|
10
dwl.c
10
dwl.c
@@ -1187,10 +1187,16 @@ createpointer(struct wlr_pointer *pointer)
|
|||||||
libinput_device_config_tap_set_drag_enabled(device, tap_and_drag);
|
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_drag_lock_enabled(device, drag_lock);
|
||||||
libinput_device_config_tap_set_button_map(device, button_map);
|
libinput_device_config_tap_set_button_map(device, button_map);
|
||||||
}
|
#if NATURALSCROLLTRACKPAD_PATCH
|
||||||
|
|
||||||
if (libinput_device_config_scroll_has_natural_scroll(device))
|
if (libinput_device_config_scroll_has_natural_scroll(device))
|
||||||
libinput_device_config_scroll_set_natural_scroll_enabled(device, natural_scrolling);
|
libinput_device_config_scroll_set_natural_scroll_enabled(device, natural_scrolling);
|
||||||
|
#endif // NATURALSCROLLTRACKPAD_PATCH
|
||||||
|
}
|
||||||
|
|
||||||
|
#if ! NATURALSCROLLTRACKPAD_PATCH
|
||||||
|
if (libinput_device_config_scroll_has_natural_scroll(device))
|
||||||
|
libinput_device_config_scroll_set_natural_scroll_enabled(device, natural_scrolling);
|
||||||
|
#endif // ! NATURALSCROLLTRACKPAD_PATCH
|
||||||
|
|
||||||
if (libinput_device_config_dwt_is_available(device))
|
if (libinput_device_config_dwt_is_available(device))
|
||||||
libinput_device_config_dwt_set_enabled(device, disable_while_typing);
|
libinput_device_config_dwt_set_enabled(device, disable_while_typing);
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#define AUTOSTART_PATCH 1
|
#define AUTOSTART_PATCH 1
|
||||||
|
|
||||||
|
#define NATURALSCROLLTRACKPAD_PATCH 1
|
||||||
|
|
||||||
#define RESTORE_MONITOR_PATCH 1
|
#define RESTORE_MONITOR_PATCH 1
|
||||||
|
|
||||||
#define VANITYGAPS_PATCH 1
|
#define VANITYGAPS_PATCH 1
|
||||||
|
27
patches/naturalscrolltrackpad-20240510.patch
Normal file
27
patches/naturalscrolltrackpad-20240510.patch
Normal file
@@ -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);
|
||||||
|
|
Reference in New Issue
Block a user