diff --git a/.local/bin/passwords b/.local/bin/passwords index 4e5967d5..ca0c077a 100644 --- a/.local/bin/passwords +++ b/.local/bin/passwords @@ -3,7 +3,7 @@ totp_tmp="${XDG_CACHE_HOME:-$HOME/.cache}/totp-tmp.png" getPasswords() { - choice="$(pass | sed -E "1d;s/(└|├|─|─ )//g" | grep -v "totp" | dmenu -i -p "Passwords")" + choice="$(find "${PASSWORD_STORE_DIR--~/.password-store}" -type f | sed "s|${PASSWORD_STORE_DIR-~/.password-store}/|| ; s/.gpg$// ; /.gpg-id/d" | sort | grep -v "totp" | dmenu -i -p "Passwords")" [ -z "$choice" ] && exit @@ -11,7 +11,7 @@ getPasswords() { } getTOTP() { - choice="$(pass | sed -E "1d;s/(└|├|─|─ )//g" | grep "totp" | dmenu -i -p "OTP")" + choice="$(find "${PASSWORD_STORE_DIR--~/.password-store}" -type f | sed "s|${PASSWORD_STORE_DIR-~/.password-store}/|| ; s/.gpg$// ; /.gpg-id/d" | sort | grep "totp" | dmenu -i -p "OTP")" [ -z "$choice" ] && exit @@ -40,15 +40,15 @@ addPassword() { case "$(printf "Random password\\nManual password" | dmenu -i -p "Passwords")" in "Random password") - case "$(printf "Simple\\nComplex" | dmenu -i -p "Passwords")" in - "Simple") - addPass=$(tr -dc 'A-Za-z0-9' ?@[\]^_`{|}~'