summaryrefslogtreecommitdiff
path: root/src/password-store.sh
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-09-19 16:56:17 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-09-19 16:56:17 +0200
commit14955bcb4f749f7a95ce8ac94d055cf3231f3696 (patch)
treeee40ef1f8341a9a0cf740fe156a1bc45df4c11f7 /src/password-store.sh
parent35c74251ffcba187c2284d67b5bc425b057b0c18 (diff)
downloadpass-14955bcb4f749f7a95ce8ac94d055cf3231f3696.tar.gz
pass-14955bcb4f749f7a95ce8ac94d055cf3231f3696.tar.bz2
pass-14955bcb4f749f7a95ce8ac94d055cf3231f3696.zip
Make qdbus ugliness more segmented.
Diffstat (limited to 'src/password-store.sh')
-rwxr-xr-xsrc/password-store.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index b09c084..f0b965a 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -80,11 +80,16 @@ clip() {
if [[ $now != $(echo -n "$1" | base64) ]]; then
before="$now"
fi
+
# It might be nice to programatically check to see if klipper exists,
# as well as checking for other common clipboard managers. But for now,
- # this works fine. Clipboard managers frequently write their history
- # out in plaintext, so we axe it here.
- qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory >/dev/null 2>&1
+ # this works fine -- if qdbus isn't there or if klipper isn't running,
+ # this essentially becomes a no-op.
+ #
+ # Clipboard managers frequently write their history out in plaintext,
+ # so we axe it here:
+ qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null
+
echo "$before" | base64 -d | xclip -selection clipboard
) & disown
echo "Copied $2 to clipboard. Will clear in 45 seconds."
oty: necoro | 2007-12-06 20:37:36 +0100Necoro1-1/+1 Fixed desktop file 2007-12-06 r572@Devoty: necoro | 2007-11-28 08:48:15 +0100Necoro1-0/+1 2007-11-27 r570@Devoty: necoro | 2007-11-27 02:08:21 +0100Necoro3-84/+108 Added scrollbars to update window