Use CLIPBOARD instead of PRIMARY - st - Personal fork of st
 (HTM) git clone git://git.drkhsh.at/st.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2e7999a61ddff1452ae7e6e43ab0d6913d40951f
 (DIR) parent 82901b4ae03c5a806773964534454549ccfca2b7
 (HTM) Author: drkhsh <me@drkhsh.at>
       Date:   Wed, 26 Oct 2022 16:35:28 +0200
       
       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