summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/emacs/password-store.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el
index 4bfa290..cdecad4 100644
--- a/contrib/emacs/password-store.el
+++ b/contrib/emacs/password-store.el
@@ -42,8 +42,11 @@
(defconst password-store-password-length 8
"Default password length.")
-(defconst password-store-timeout 45
- "Number of seconds to wait before clearing the password.")
+(defun password-store-timeout ()
+ "Number of seconds to wait before clearing the password."
+ (if (getenv "PASSWORD_STORE_CLIP_TIME")
+ (string-to-number (getenv "PASSWORD_STORE_CLIP_TIME"))
+ 45))
(defun password-store--run (&rest args)
"Run pass with ARGS.
@@ -181,8 +184,8 @@ after `password-store-timeout' seconds."
(password-store-clear)
(kill-new password)
(setq password-store-kill-ring-pointer kill-ring-yank-pointer)
- (message "Copied %s to the kill ring. Will clear in %s seconds." entry password-store-timeout)
- (run-at-time password-store-timeout nil 'password-store-clear)))
+ (message "Copied %s to the kill ring. Will clear in %s seconds." entry (password-store-timeout))
+ (run-at-time (password-store-timeout) nil 'password-store-clear)))
;;;###autoload
(defun password-store-init (gpg-id)
w=1'>Small changesRené 'Necoro' Neumann1-1/+4 2008-03-07Updated shm module to 1.2René 'Necoro' Neumann1-8/+21 2008-03-07Update TODORené 'Necoro' Neumann1-3/+1 2008-03-07hmm ... yesRené 'Necoro' Neumann1-1/+1 2008-03-06Used better exceptions for configuration parserRené 'Necoro' Neumann1-26/+114 2008-03-06Update translationRené 'Necoro' Neumann2-349/+393 2008-03-06Update createpot.shRené 'Necoro' Neumann1-3/+2 2008-03-06Use 'nofork' instead of 'nolistener'René 'Necoro' Neumann1-3/+3 2008-03-05Install glade files into template dir and not data dirRené 'Necoro' Neumann2-2/+1 2008-03-05Added dependency listRené 'Necoro' Neumann3-117/+237