diff options
Diffstat (limited to 'lib/keyringer/actions')
-rwxr-xr-x | lib/keyringer/actions/mv | 3 | ||||
-rwxr-xr-x | lib/keyringer/actions/sclip | 23 |
2 files changed, 26 insertions, 0 deletions
diff --git a/lib/keyringer/actions/mv b/lib/keyringer/actions/mv index 2324145..e31eb85 100755 --- a/lib/keyringer/actions/mv +++ b/lib/keyringer/actions/mv @@ -24,5 +24,8 @@ if ! echo "$ORIG" | grep -q '*' && [ ! -e "$KEYDIR/$RELATIVE_PATH/$ORIG" ]; then exit 1 fi +# Ensure destination path exists +mkdir -p "`dirname $KEYDIR/$RELATIVE_PATH/$DEST`" + # Run move command keyringer_exec git "$BASEDIR" mv "keys/$RELATIVE_PATH/$ORIG" "keys/$FILE" 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 |