mirror of
https://github.com/stumpwm/stumpwm-contrib.git
synced 2026-09-10 07:26:25 -04:00
Add $PASSWORD_STORE_DIR support to pass for XDG (#182)
pass has partial support for the XDG Base Directory specification. The most common value for PASSWORD_STORE_DIR is either unset or $XDG_DATA_DIR/password-store See the man page of pass for more details: https://git.zx2c4.com/password-store/about/#ENVIRONMENT%20VARIABLES
This commit is contained in:
parent
dd5b037923
commit
d337cfccf5
|
|
@ -3,5 +3,5 @@
|
|||
:description "Integrate 'pass' with StumpWM"
|
||||
:author "Florian Margaine <florian@margaine.com>"
|
||||
:license "GPLv3"
|
||||
:depends-on (:stumpwm)
|
||||
:depends-on (:stumpwm :uiop)
|
||||
:components ((:file "pass")))
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
(defpackage #:pass
|
||||
(:use #:cl)
|
||||
(:export *password-store*))
|
||||
(:export #:*password-store*)
|
||||
(:import-from #:uiop #:getenv-absolute-directory))
|
||||
|
||||
(in-package #:pass)
|
||||
|
||||
(defvar *password-store* (merge-pathnames #p".password-store/" (user-homedir-pathname)))
|
||||
(defvar *password-store*
|
||||
(or (getenv-absolute-directory "PASSWORD_STORE_DIR")
|
||||
(merge-pathnames #p".password-store/"
|
||||
(user-homedir-pathname)))
|
||||
"Location to search for names in the password store, according to the XDG Base
|
||||
Directory Specification. Tries $PASSWORD_STORE_DIR then $HOME/.password-store/.")
|
||||
|
||||
(defun pass-entries ()
|
||||
(let ((home-ns-len (length (namestring *password-store*))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue