[wiki] [sites] Update for 0.8.2 and also make middle click paste from CLIPBOARD too || Kai Hendry

From: <git_AT_suckless.org>
Date: Wed, 13 Feb 2019 03:13:20 +0100

commit e2f3569907fb6d81da0389708a49c2b16f0d61ad
Author: Kai Hendry <hendry_AT_iki.fi>
Date: Wed Feb 13 10:12:36 2019 +0800

    Update for 0.8.2 and also make middle click paste from CLIPBOARD too

diff --git a/st.suckless.org/patches/clipboard/index.md b/st.suckless.org/patches/clipboard/index.md
index a5a58aab..fb6db659 100644
--- a/st.suckless.org/patches/clipboard/index.md
+++ b/st.suckless.org/patches/clipboard/index.md
_AT_@ -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
new file mode 100644
index 00000000..efdc279c
--- /dev/null
+++ b/st.suckless.org/patches/clipboard/st-clipboard-0.8.2.diff
_AT_@ -0,0 +1,22 @@
+diff --git a/x.c b/x.c
+index 0422421..e00d930 100644
+--- a/x.c
++++ b/x.c
+_AT_@ -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
+_AT_@ -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);
+ }
Received on Wed Feb 13 2019 - 03:13:20 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 13 2019 - 03:24:28 CET