Use CLIPBOARD instead of PRIMARY - st - personal variant of st (HTM) git clone https://git.drkhsh.at/st.git (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 60ff062e41862ada6d57645a94bd7931aee87e37 (DIR) parent fd3fdf432c3f7e6274b1a42f21b3b866d7c8b841 (HTM) Author: drkhsh <me@drkhsh.at> Date: Wed, 10 Jan 2024 10:11:05 +0100 Use CLIPBOARD instead of PRIMARY This trivial patch sets CLIPBOARD on selection, and pastes from it instead of PRIMARY (as suggested). https://st.suckless.org/patches/clipboard/ Diffstat: M config.def.h | 2 +- M x.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) --- (DIR) diff --git a/config.def.h b/config.def.h @@ -176,7 +176,7 @@ static uint forcemousemod = ShiftMask; */ static MouseShortcut mshortcuts[] = { /* mask button function argument release */ - { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { XK_ANY_MOD, Button2, clippaste, {.i = 0}, 1 }, { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, (DIR) diff --git a/x.c b/x.c @@ -686,6 +686,7 @@ setsel(char *str, Time t) XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t); if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win) selclear(); + clipcopy(NULL); } void