aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-02-22 15:50:43 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-02-22 15:50:43 -0300
commit73eda56a8a1c0d2e262bfad5dee96deb7d4bcb62 (patch)
tree9c607d4d479e82ebcd724357752b478a61d7e634
parent324dc0c1433413f739bd64ed7eda0207658bc84f (diff)
downloadkeyringer-73eda56a8a1c0d2e262bfad5dee96deb7d4bcb62.tar.gz
keyringer-73eda56a8a1c0d2e262bfad5dee96deb7d4bcb62.tar.bz2
Using XA_PRIMARY selection at xclip action
-rw-r--r--ChangeLog2
-rwxr-xr-xlib/keyringer/actions/xclip10
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b753bc7..c9454e1 100644
--- 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
diff --git a/lib/keyringer/actions/xclip b/lib/keyringer/actions/xclip
index 0ce0652..e33c261 100755
--- a/lib/keyringer/actions/xclip
+++ b/lib/keyringer/actions/xclip
@@ -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."
}