]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Using XA_PRIMARY selection at xclip action
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 22 Feb 2014 18:50:43 +0000 (15:50 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 22 Feb 2014 18:50:43 +0000 (15:50 -0300)
ChangeLog
lib/keyringer/actions/xclip

index b753bc786ef4ca75171ef9246d5e687d1eb55b9b..c9454e10aa8fb00ba481af2042c5d943de311774 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2014-02-20 - Silvio Rhatto  <rhatto@riseup.net>
 
+       Using XA_PRIMARY selection at xclip action
+
        Fixed secret paths at mv action
 
        Do not use RELATIVE_PATH on git action
index 0ce065281badd989660c8d3090a5ec2757c72f08..e33c261d6babdc812bb87911a1434cdcd5a521f7 100755 (executable)
@@ -11,11 +11,13 @@ clip() {
        # in shell. There must be a better way to deal with this, but because I'm a dolt,
        # we're going with this for now.
 
-       before="$(xclip -o -selection clipboard | base64)"
-       echo -n "$1" | xclip -selection clipboard
+  #local xclip="xclip -selection clipboard"
+  local xclip="xclip"
+       before="$($xclip -o | base64)"
+       echo -n "$1" | $xclip
        (
                sleep 45
-               now="$(xclip -o -selection clipboard | base64)"
+               now="$($xclip -o | base64)"
                if [[ $now != $(echo -n "$1" | base64) ]]; then
                        before="$now"
                fi
@@ -29,7 +31,7 @@ clip() {
                # so we axe it here:
                qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null
 
-               echo "$before" | base64 -d | xclip -selection clipboard
+               echo "$before" | base64 -d | $xclip
        ) & disown
        echo "Copied $2 to clipboard. Will clear in 45 seconds."
 }