diff --git a/dwl_patches/naturalscrolltrackpad.patch b/dwl_patches/naturalscrolltrackpad.patch new file mode 100644 index 0000000..e10b3ed --- /dev/null +++ b/dwl_patches/naturalscrolltrackpad.patch @@ -0,0 +1,27 @@ +From b4eb343faff1ff15dd5d70a1f317dca201c5e37c Mon Sep 17 00:00:00 2001 +From: Nikita Ivanov +Date: Sun, 21 May 2023 17:40:15 +0200 +Subject: [PATCH] Set natural scrolling only for trackpads + +--- + dwl.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/dwl.c b/dwl.c +index b7436bb4f..8db928292 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -1029,10 +1029,10 @@ createpointer(struct wlr_pointer *pointer) + libinput_device_config_tap_set_drag_enabled(libinput_device, tap_and_drag); + libinput_device_config_tap_set_drag_lock_enabled(libinput_device, drag_lock); + libinput_device_config_tap_set_button_map(libinput_device, button_map); +- } + +- if (libinput_device_config_scroll_has_natural_scroll(libinput_device)) +- libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, natural_scrolling); ++ if (libinput_device_config_scroll_has_natural_scroll(libinput_device)) ++ libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, natural_scrolling); ++ } + + if (libinput_device_config_dwt_is_available(libinput_device)) + libinput_device_config_dwt_set_enabled(libinput_device, disable_while_typing); diff --git a/modules/dwl/config.h b/modules/dwl/config.h index 5be3aa9..f05893f 100644 --- a/modules/dwl/config.h +++ b/modules/dwl/config.h @@ -63,7 +63,7 @@ static const MonitorRule monrules[] = { /* keyboard */ static const struct xkb_rule_names xkb_rules = { /* can specify fields: rules, model, layout, variant, options */ - .options = "caps:swapescape", + .options = "caps:escape", }; static const int repeat_rate = 25; diff --git a/modules/misc/nvim/lua/plugins/lsp.lua b/modules/misc/nvim/lua/plugins/lsp.lua index 672922b..d453ba4 100644 --- a/modules/misc/nvim/lua/plugins/lsp.lua +++ b/modules/misc/nvim/lua/plugins/lsp.lua @@ -373,6 +373,7 @@ return { typescriptreact = { { "prettierd", "prettier" } }, css = { { "prettierd", "prettier" } }, html = { { "prettierd", "prettier" } }, + sql = { "pg_format" }, }, } }, diff --git a/overlays/default.nix b/overlays/default.nix index 6b97846..2ffcfdb 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -37,6 +37,7 @@ in { ../dwl_patches/movestack.patch ../dwl_patches/gdk_monitors_status.patch ../dwl_patches/rotatetags.patch + ../dwl_patches/naturalscrolltrackpad.patch ]; });