commit e2f3569907fb6d81da0389708a49c2b16f0d61ad
parent cf4ca09a829c698f69ca1c906a32d7846d986a1e
Author: Kai Hendry <hendry@iki.fi>
Date: Wed, 13 Feb 2019 10:12:36 +0800
Update for 0.8.2 and also make middle click paste from CLIPBOARD too
Diffstat:
2 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/st.suckless.org/patches/clipboard/index.md b/st.suckless.org/patches/clipboard/index.md
@@ -1,18 +1,27 @@
-clipboard
-=========
+one clipboard
+=============
+
+Free Desktop mandates the user to remember which of two clipboards you are
+keeping selections in. If you switch between a terminal and browser, you might
+this UX jarring. This patch modifies st to work from one CLIPBOARD, the same as
+your browser.
Description
-----------
-st only sets PRIMARY on selection since
+st by default only sets PRIMARY on selection since
[March 2015](//git.suckless.org/st/commit/?id=28259f5750f0dc7f52bbaf8b746ec3dc576a58ee)
according to the
[Freedesktop standard](http://standards.freedesktop.org/clipboards-spec/clipboards-latest.txt).
-This patch brings back the old behaviour, namely additionally setting
-CLIPBOARD.
+This patch makes st set CLIPBOARD on selection.
+Furthermore from `st-clipboard-0.8.2.diff` middle click pastes from CLIPBOARD.
+
+You may want to replace selpaste with clippaste in your config.h to complete
+the affect.
Download
--------
+* [st-clipboard-0.8.2.diff](st-clipboard-0.8.2.diff)
* [st-clipboard-0.8.1.diff](st-clipboard-0.8.1.diff)
* [st-clipboard-0.6.diff](st-clipboard-0.6.diff)
* [st-clipboard-0.7.diff](st-clipboard-0.7.diff)
diff --git a/st.suckless.org/patches/clipboard/st-clipboard-0.8.2.diff b/st.suckless.org/patches/clipboard/st-clipboard-0.8.2.diff
@@ -0,0 +1,22 @@
+diff --git a/x.c b/x.c
+index 0422421..e00d930 100644
+--- a/x.c
++++ b/x.c
+@@ -627,6 +627,8 @@ 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
+@@ -644,7 +646,7 @@ brelease(XEvent *e)
+ }
+
+ if (e->xbutton.button == Button2)
+- selpaste(NULL);
++ clippaste(NULL);
+ else if (e->xbutton.button == Button1)
+ mousesel(e, 1);
+ }