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).
This commit is contained in:
parent
3e50f9460a
commit
c5f101d996
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue