commit 065e91a5fc0cd8cd811d7f734d3ec999f701f294
parent 7c87f80234bff181367148c52360b87df04489ed
Author: Streetwalrus Einstein <streetwalrus@codewalr.us>
Date: Fri, 11 Sep 2015 23:29:14 +0300
Take over the clipboard to persist it after the owner quits
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git 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.