summaryrefslogtreecommitdiff
path: root/lib/keyringer/actions/sclip
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-11-09 10:27:57 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-11-09 10:27:57 -0200
commite19c2219a9a4b1962151cd886ef025826e2838c7 (patch)
tree53c4eaba89b3b564a778f4ec299b6fb19e48bf3d /lib/keyringer/actions/sclip
parent84319a2c2806f623adbff33a804a3338905ebd3e (diff)
parent321be0df19d4443a4f13ca9870782f7c4ece049f (diff)
downloadkeyringer-e19c2219a9a4b1962151cd886ef025826e2838c7.tar.gz
keyringer-e19c2219a9a4b1962151cd886ef025826e2838c7.tar.bz2
Merge tag 'upstream_keyringer_0.4.0' into debian
Upstream version 0.4.0
Diffstat (limited to 'lib/keyringer/actions/sclip')
-rwxr-xr-xlib/keyringer/actions/sclip23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/keyringer/actions/sclip b/lib/keyringer/actions/sclip
new file mode 100755
index 0000000..e4c88fa
--- /dev/null
+++ b/lib/keyringer/actions/sclip
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#
+# Decrypt secret header to clipboard, sleep and cleanup.
+#
+
+# Load functions
+LIB="`dirname $0`/../functions"
+source "$LIB" || exit 1
+
+# Clip password
+shift
+keyringer $KEYRING xclip $*
+
+# Move to the next window
+if which xdotool &> /dev/null; then
+ xdotool key alt+Tab
+fi
+
+# Sleep
+sleep 5
+
+# Overwrite clipboard
+cat $RANDOM | sha256sum | base64 -d | xclip