From dc64757b22b97df3d52e7b4b348afed3a2e66274 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 20 Apr 2023 15:26:40 -0500 Subject: move dmenu_keepass to scripts --- dmenu_keepass | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100755 dmenu_keepass (limited to 'dmenu_keepass') diff --git a/dmenu_keepass b/dmenu_keepass deleted file mode 100755 index d87a4c8..0000000 --- a/dmenu_keepass +++ /dev/null @@ -1,30 +0,0 @@ -#!/sbin/sh - -HAS_KEYFILE="y" - -PASS_DIR="$HOME/Pass" -[ -n "$HAS_KEYFILE" ] && \ - KEYFILE=`ls $PASS_DIR | barmenu $@ -p 'keyfile:'` && \ - [ -n "$KEYFILE" ] && \ - KEYFILE_FLAG="-k" && \ - echo "$KEYFILE" || \ - exit 2 - -PASS_DB=`ls $PASS_DIR | barmenu $@ -p 'database:'` && \ - [ -f "$PASS_DIR/$PASS_DB" ] && - echo "$PASS_DB" || \ - exit 1 - - -PASS_WD=`barmenu -P $@ -p 'password:'` - -PASS_LS=`echo "$PASS_WD" | keepassxc-cli ls -Rf "$KEYFILE_FLAG" "$PASS_DIR/$KEYFILE" "$PASS_DIR/$PASS_DB"` - -PASSWORD_SEL=`echo "$PASS_LS" | barmenu $@ -p password` - -PASS_ATTR=`echo "username\npassword" | barmenu $@ -p "which attribute to copy?"` && \ - [ -z "$PASS_ATTR" ] && \ - PASS_ATTR="password" - -echo "$PASS_WD" | keepassxc-cli clip -a "$PASS_ATTR" "$KEYFILE_FLAG" "$PASS_DIR/$KEYFILE" "$PASS_DIR/$PASS_DB" "$PASSWORD_SEL" 15 - -- cgit v1.2.3