mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-30 03:56:12 +01:00
c1684d5203
Signed-off-by: magic_rb <magic_rb@redalder.org>
20 lines
456 B
Bash
20 lines
456 B
Bash
|
|
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
|