From 065e91a5fc0cd8cd811d7f734d3ec999f701f294 Mon Sep 17 00:00:00 2001 From: Streetwalrus Einstein Date: Fri, 11 Sep 2015 23:29:14 +0300 Subject: [PATCH] Take over the clipboard to persist it after the owner quits --- clipmenud | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clipmenud b/clipmenud index 27958fa..b22e733 100755 --- a/clipmenud +++ b/clipmenud @@ -9,8 +9,10 @@ while sleep "${CLIPMENUD_SLEEP:-0.5}"; do for selection in clipboard primary; do if type -p xsel >/dev/null 2>&1; then data=$(xsel --"$selection"; printf x) + xsel --"$selection" | xsel -i --"$selection" else data=$(xclip -o -sel "$selection"; printf x) + xclip -o -sel "$selection" | xclip -i -sel "$selection" fi # We add and remove the x so that trailing newlines are not stripped.