]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Adds sclip action
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 23 Oct 2016 20:24:56 +0000 (18:24 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 23 Oct 2016 20:24:56 +0000 (18:24 -0200)
lib/keyringer/actions/sclip [new file with mode: 0755]

diff --git a/lib/keyringer/actions/sclip b/lib/keyringer/actions/sclip
new file mode 100755 (executable)
index 0000000..8f2debd
--- /dev/null
@@ -0,0 +1,18 @@
+#!/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 $*
+
+# Sleep
+sleep 5
+
+# Overwrite clipboard
+cat $RANDOM | sha256sum | base64 -d | xclip