sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit f0008e43c5d6484e09387c0089b0770a58bd8453
parent 8d0778f24e33c557ed3015c2108e9eae3dffc33e
Author: Kai Hendry <hendry@iki.fi>
Date:   Thu, 30 Apr 2020 10:10:56 +0800

"There can only be one clipboard" patch for the new 0.8.3 release

Diffstat:
Mst.suckless.org/patches/clipboard/index.md | 17++++++-----------
Ast.suckless.org/patches/clipboard/st-clipboard-0.8.3.diff | 12++++++++++++
2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/st.suckless.org/patches/clipboard/index.md b/st.suckless.org/patches/clipboard/index.md @@ -1,26 +1,21 @@ 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. +The [Freedesktop +standard](http://standards.freedesktop.org/clipboards-spec/clipboards-latest.txt) +requires you to remember which clipboard you are keeping selections in. If you +switch between a terminal and browser, you might find this UX jarring. Description ----------- -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 makes st set CLIPBOARD on selection. -Furthermore from `st-clipboard-0.8.2.diff` middle click pastes from CLIPBOARD. +This trivial patch makes st set CLIPBOARD on selection, the same as your browser. You may want to replace selpaste with clippaste in your config.h to complete the affect. Download -------- +* [st-clipboard-0.8.3.diff](st-clipboard-0.8.3.diff) * [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) diff --git a/st.suckless.org/patches/clipboard/st-clipboard-0.8.3.diff b/st.suckless.org/patches/clipboard/st-clipboard-0.8.3.diff @@ -0,0 +1,12 @@ +diff --git a/x.c b/x.c +index e5f1737..5cabd60 100644 +--- a/x.c ++++ b/x.c +@@ -673,6 +673,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