password_list="$(emacs -Q --batch --eval $'(progn (require \'server) (princ (format "%s\n" (server-eval-at "server" \'(string-join (password-store-list) "\n")))))')" password="$(echo "$password_list" | emacs-rofi "password: " 90 30)" if [[ "$password" == "nil" ]] ; then exit 1 fi case $1 in "copy") pass -c "$password" ;; "qr") alacritty -e sh -c "echo \"waiting for yubikey\" ; pass -q $password ; read" ;; *) echo error ;; esac