bin

git clone git://git.codymlewis.com/bin.git
Log | Files | Refs

get_pass (457B)


      1 #!/bin/sh
      2 
      3 a=$(ls "$HOME/.password-store" | fzf -i --prompt="What website do you want a password for? ")
      4 [ $(ls "$HOME/.password-store/$a" | wc -l) = 1 ] &&
      5         b=$(ls "$HOME/.password-store/$a" | sed 's/\.gpg//') ||
      6         b=$(ls "$HOME/.password-store/$a" | sed 's/\.gpg//' | fzf -i --prompt="Which account do you want a password for? ")
      7 
      8 (tpm show "$a/$b" | xsel -p) && (echo "$a" | xsel -b)  && notify-send "Password for $a/$b copied to clipboard"