commit c5f101d996a6ef47a0ee1764bdc1ca8e16547724
parent 3e50f9460ab6a019e160142a51d09b6b7bb74b73
Author: Chris Down <chris@chrisdown.name>
Date: Sat, 5 Nov 2016 12:05:22 -0600
Use -o when running xsel
xsel` without `-o` even though it has the same *end* result, has
different internal logic. Specifically, it seems to do things with the
PRIMARY selection that cause weird behaviour (like causing applications
like urxvt to deselect their selection, see #33).
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clipmenud b/clipmenud
@@ -54,7 +54,7 @@ while sleep "${CLIPMENUD_SLEEP:-0.5}"; do
if type -p xsel >/dev/null 2>&1; then
debug 'Using xsel'
- data=$(xsel --"$selection"; printf x)
+ data=$(xsel -o --"$selection"; printf x)
# Take ownership of the clipboard, in case the original application
# is unable to serve the clipboard request (due to being suspended,
# etc).
@@ -63,7 +63,7 @@ while sleep "${CLIPMENUD_SLEEP:-0.5}"; do
# sometimes act up if clipboard focus is taken away from them --
# for example, urxvt will unhilight text, which is undesirable.
if [[ $selection != primary ]]; then
- xsel --"$selection" | xsel -i --"$selection"
+ xsel -o --"$selection" | xsel -i --"$selection"
fi
else
debug 'Using xclip'