mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: Distinguish natural scrolling Settings between the trackpad and the scroll wheel
This commit is contained in:
parent
027f05c1a2
commit
47c1a7e328
4 changed files with 24 additions and 11 deletions
|
|
@ -51,15 +51,20 @@ repeat_delay=600
|
|||
numlockon=1
|
||||
|
||||
# Trackpad
|
||||
# need relogin to make it apply
|
||||
tap_to_click=1
|
||||
tap_and_drag=1
|
||||
drag_lock=1
|
||||
natural_scrolling=0
|
||||
trackpad_natural_scrolling=0
|
||||
disable_while_typing=1
|
||||
left_handed=0
|
||||
middle_button_emulation=0
|
||||
swipe_min_threshold=20
|
||||
|
||||
# mouse
|
||||
# need relogin to make it apply
|
||||
mouse_natural_scrolling=0
|
||||
|
||||
# Appearance
|
||||
gappih=5
|
||||
gappiv=5
|
||||
|
|
@ -140,6 +145,7 @@ tags=id:9,layout_name:tile
|
|||
# 7:flip and rotate 270 degrees counter-clockwise
|
||||
|
||||
# example
|
||||
# need relogin to make it apply
|
||||
# monitorrule=eDP-1,0.55,1,tile,0,1,0,0
|
||||
# monitorrule=HDMI-A-1,0.55,1,tile,0,1,1920,0
|
||||
|
||||
|
|
|
|||
9
maomao.c
9
maomao.c
|
|
@ -2801,11 +2801,12 @@ 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);
|
||||
device, trackpad_natural_scrolling);
|
||||
} else {
|
||||
libinput_device_config_scroll_set_natural_scroll_enabled(
|
||||
device, mouse_natural_scrolling);
|
||||
}
|
||||
|
||||
if (libinput_device_config_dwt_is_available(device))
|
||||
libinput_device_config_dwt_set_enabled(device, disable_while_typing);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,8 @@ typedef struct {
|
|||
int tap_to_click;
|
||||
int tap_and_drag;
|
||||
int drag_lock;
|
||||
int natural_scrolling;
|
||||
int mouse_natural_scrolling;
|
||||
int trackpad_natural_scrolling;
|
||||
int disable_while_typing;
|
||||
int left_handed;
|
||||
int middle_button_emulation;
|
||||
|
|
@ -724,8 +725,10 @@ void parse_config_line(Config *config, const char *line) {
|
|||
config->tap_and_drag = atoi(value);
|
||||
} else if (strcmp(key, "drag_lock") == 0) {
|
||||
config->drag_lock = atoi(value);
|
||||
} else if (strcmp(key, "natural_scrolling") == 0) {
|
||||
config->natural_scrolling = atoi(value);
|
||||
} else if (strcmp(key, "mouse_natural_scrolling") == 0) {
|
||||
config->mouse_natural_scrolling = atoi(value);
|
||||
} else if (strcmp(key, "trackpad_natural_scrolling") == 0) {
|
||||
config->trackpad_natural_scrolling = atoi(value);
|
||||
} else if (strcmp(key, "disable_while_typing") == 0) {
|
||||
config->disable_while_typing = atoi(value);
|
||||
} else if (strcmp(key, "left_handed") == 0) {
|
||||
|
|
@ -1218,7 +1221,8 @@ void override_config(void) {
|
|||
tap_to_click = config.tap_to_click;
|
||||
tap_and_drag = config.tap_and_drag;
|
||||
drag_lock = config.drag_lock;
|
||||
natural_scrolling = config.natural_scrolling;
|
||||
mouse_natural_scrolling = config.mouse_natural_scrolling;
|
||||
trackpad_natural_scrolling = config.trackpad_natural_scrolling;
|
||||
disable_while_typing = config.disable_while_typing;
|
||||
left_handed = config.left_handed;
|
||||
middle_button_emulation = config.middle_button_emulation;
|
||||
|
|
@ -1288,7 +1292,8 @@ void set_value_default() {
|
|||
config.tap_to_click = tap_to_click;
|
||||
config.tap_and_drag = tap_and_drag;
|
||||
config.drag_lock = drag_lock;
|
||||
config.natural_scrolling = natural_scrolling;
|
||||
config.mouse_natural_scrolling = mouse_natural_scrolling;
|
||||
config.trackpad_natural_scrolling = trackpad_natural_scrolling;
|
||||
config.disable_while_typing = disable_while_typing;
|
||||
config.left_handed = left_handed;
|
||||
config.middle_button_emulation = middle_button_emulation;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,8 @@ int repeat_delay = 600;
|
|||
int tap_to_click = 1;
|
||||
int tap_and_drag = 1;
|
||||
int drag_lock = 1;
|
||||
int natural_scrolling = 0;
|
||||
int mouse_natural_scrolling = 0;
|
||||
int trackpad_natural_scrolling = 0;
|
||||
int disable_while_typing = 1;
|
||||
int left_handed = 0;
|
||||
int middle_button_emulation = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue