configurations and the like
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
635 B

  1. #!/usr/bin/env zsh
  2. source ~/.config/init/vars
  3. zparseopts -M -E -A args \
  4. f -firefox=f
  5. local password_files
  6. password_files=( ~/.password-store/**/*.gpg )
  7. password_files=( ${password_files:t:r} )
  8. printf "%s\n" $password_files | dmenu -fn "${bfont}:size=${bfont_size}" -i \
  9. -h "$bheight" -nb "$bar_bg" -nf "$bar_fg" \
  10. -sb "$bg_focus" -sf "$fg_focus" \
  11. -p "Pass:" | cut -d ')' -f 1 | read choice
  12. [[ -n $choice ]] || exit
  13. pass show $choice | sed -n -e 's/^login: //p' | xclip -selection clipboard
  14. pass show $choice | sed -n -e 's/^url: //p' | read url
  15. [[ ${(@k)args[-f]} ]] && firefox --new-tab "$url"
  16. pass show -c $choice