:tools password-store -> :tools pass
A simpler name and matches the prefix of its module.
This commit is contained in:
parent
0674e4b4b0
commit
c3cb7c5000
9 changed files with 13 additions and 12 deletions
40
modules/tools/pass/config.el
Normal file
40
modules/tools/pass/config.el
Normal file
|
@ -0,0 +1,40 @@
|
|||
;;; tools/pass/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +pass-user-fields '("login" "user" "username" "email")
|
||||
"A list of fields for `+pass/ivy' to search for the username.")
|
||||
|
||||
(defvar +pass-url-fields '("url" "site" "location")
|
||||
"A list of fields for `+pass/ivy' to search for the username.")
|
||||
|
||||
|
||||
;;
|
||||
;; Packages
|
||||
|
||||
;; `password-store'
|
||||
(setq password-store-password-length 12)
|
||||
|
||||
;; Fix hard-coded password-store location; respect PASSWORD_STORE_DIR envvar
|
||||
(defun +pass*read-entry (entry)
|
||||
"Return a string with the file content of ENTRY."
|
||||
(with-temp-buffer
|
||||
(insert-file-contents
|
||||
(expand-file-name (format "%s.gpg" entry) (password-store-dir)))
|
||||
(buffer-substring-no-properties (point-min) (point-max))))
|
||||
(advice-add #'auth-source-pass--read-entry :override #'+pass*read-entry)
|
||||
|
||||
|
||||
;; `pass'
|
||||
(after! pass
|
||||
(set-evil-initial-state! 'pass-mode 'emacs)
|
||||
(set-popup-rule! "^\\*Password-Store" :side 'left :size 0.25 :quit nil)
|
||||
(define-key! pass-mode-map
|
||||
"j" #'pass-next-entry
|
||||
"k" #'pass-prev-entry
|
||||
"d" #'pass-kill
|
||||
"\C-j" #'pass-next-directory
|
||||
"\C-k" #'pass-prev-directory))
|
||||
|
||||
|
||||
;; Is built into Emacs 26+
|
||||
(when (and EMACS26+ (featurep! +auth))
|
||||
(auth-source-pass-enable))
|
Loading…
Add table
Add a link
Reference in a new issue