diff options
author | Leonard Kugis <leonard@kug.is> | 2025-05-23 11:41:09 +0000 |
---|---|---|
committer | Leonard Kugis <leonard@kug.is> | 2025-05-23 11:41:09 +0000 |
commit | c70505d7c7b7b48600f273357694b56ccf5d2a15 (patch) | |
tree | 21c27ac6ffced8d6d904e35bdb39baa5d685d829 /dwl-patches/patches/primaryselection | |
download | dotfiles-master.tar.gz dotfiles-master.tar.bz2 dotfiles-master.zip |
Diffstat (limited to 'dwl-patches/patches/primaryselection')
-rw-r--r-- | dwl-patches/patches/primaryselection/README.md | 10 | ||||
-rw-r--r-- | dwl-patches/patches/primaryselection/primaryselection.patch | 50 |
2 files changed, 60 insertions, 0 deletions
diff --git a/dwl-patches/patches/primaryselection/README.md b/dwl-patches/patches/primaryselection/README.md new file mode 100644 index 0000000..1154452 --- /dev/null +++ b/dwl-patches/patches/primaryselection/README.md @@ -0,0 +1,10 @@ +### Description +Adds a config option to disable/enable primary selection (middle-click paste). + +### Download +- [git branch](https://codeberg.org/nullsystem/dwl/src/branch/main_primaryselection) +- [2024-04-06](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/primaryselection/primaryselection.patch) + +### Authors +- [nullsystem](https://codeberg.org/nullsystem) +- [Palanix](https://github.com/PalanixYT) - Previous Primary-Selection patch diff --git a/dwl-patches/patches/primaryselection/primaryselection.patch b/dwl-patches/patches/primaryselection/primaryselection.patch new file mode 100644 index 0000000..ab6bb64 --- /dev/null +++ b/dwl-patches/patches/primaryselection/primaryselection.patch @@ -0,0 +1,50 @@ +From 4fc77fde2f6015564544e029f9905fc1678fcb59 Mon Sep 17 00:00:00 2001 +From: nullsystem <nullsystem.aongp@slmail.me> +Date: Sat, 6 Apr 2024 14:19:44 +0100 +Subject: [PATCH] primaryselection - disable/enable primary selection + +* Just simply adds a config to disable/enable primary selection +--- + config.def.h | 1 + + dwl.c | 6 ++++-- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 8847e58..057e1c3 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -66,6 +66,7 @@ static const int natural_scrolling = 0; + static const int disable_while_typing = 1; + static const int left_handed = 0; + static const int middle_button_emulation = 0; ++static const int enable_primary_selection = 0; + /* You can choose between: + LIBINPUT_CONFIG_SCROLL_NO_SCROLL + LIBINPUT_CONFIG_SCROLL_2FG +diff --git a/dwl.c b/dwl.c +index bf763df..7e8d8f2 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -2339,7 +2339,8 @@ setup(void) + wlr_export_dmabuf_manager_v1_create(dpy); + wlr_screencopy_manager_v1_create(dpy); + wlr_data_control_manager_v1_create(dpy); +- wlr_primary_selection_v1_device_manager_create(dpy); ++ if (enable_primary_selection) ++ wlr_primary_selection_v1_device_manager_create(dpy); + wlr_viewporter_create(dpy); + wlr_single_pixel_buffer_manager_v1_create(dpy); + wlr_fractional_scale_manager_v1_create(dpy, 1); +@@ -2449,7 +2450,8 @@ setup(void) + seat = wlr_seat_create(dpy, "seat0"); + LISTEN_STATIC(&seat->events.request_set_cursor, setcursor); + LISTEN_STATIC(&seat->events.request_set_selection, setsel); +- LISTEN_STATIC(&seat->events.request_set_primary_selection, setpsel); ++ if (enable_primary_selection) ++ LISTEN_STATIC(&seat->events.request_set_primary_selection, setpsel); + LISTEN_STATIC(&seat->events.request_start_drag, requeststartdrag); + LISTEN_STATIC(&seat->events.start_drag, startdrag); + +-- +2.44.0 + |