config/emacs: pinentry

This commit is contained in:
Sakooooo 2024-10-13 14:31:48 +04:00
parent c514b653d3
commit 67ce8ffdd6
Signed by: sako
GPG key ID: FE52FD65B76E4751

View file

@ -621,7 +621,11 @@ kept-old-versions 5)
(use-package pinentry (use-package pinentry
:config :config
(setq epa-pinentry-mode 'loopback)) (setq epa-pinentry-mode 'loopback))
(pinentry-start)) (pinentry-start)
(defun pinentry-emacs (desc prompt ok error)
(let ((str (read-passwd (concat (replace-regexp-in-string "%22" "\"" (replace-regexp-in-string "%0A" "\n" desc)) prompt ": "))))
str))
)
#+end_src #+end_src
** Password-Store ** Password-Store
#+begin_src emacs-lisp #+begin_src emacs-lisp