clipmenu

Simple clipboard management using dmenu
git clone https://git.sinitax.com/cdown/clipmenu
Log | Files | Refs | README | LICENSE | sfeed.txt

commit fe6986110197aa73f22fdcbc4f4991f8350ee8b3
parent 47eb3d182c22e4ab2584562ef9dd215df43796dd
Author: Chris Down <chris@chrisdown.name>
Date:   Mon, 19 Feb 2018 15:11:35 +0000

Make sure we don't break #34 in new pre-ownership

Diffstat:
Mclipmenud | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/clipmenud b/clipmenud @@ -107,7 +107,10 @@ while true; do # Primary is excluded from the change of ownership as applications # sometimes act up if clipboard focus is taken away from them -- # for example, urxvt will unhilight text, which is undesirable. - _xsel -o --clipboard | _xsel -i --clipboard + # + # We need to check if the clipboard is empty to mitigate #34. + data=$(_xsel -o --clipboard; printf x) + [[ $data != x ]] && _xsel -i --clipboard <<< "${data%x}" fi if ! (( CM_ONESHOT )); then