diff options
author | Thanos Apollo <[email protected]> | 2023-09-22 21:39:06 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-09-22 21:39:06 +0300 |
commit | b64d5b147a7fff20a11a6496c76b004d64f7babb (patch) | |
tree | be720f3d4af3eb8f3290de91a5f37020c12a7a1d /.emacs.d | |
parent | fc9e9dd24d05bf71a0afc8bef16e359d4cd49c83 (diff) |
pass.el: Update launcher
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/modules/thanos-pass.el | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/.emacs.d/modules/thanos-pass.el b/.emacs.d/modules/thanos-pass.el index 505093b..89a07b9 100644 --- a/.emacs.d/modules/thanos-pass.el +++ b/.emacs.d/modules/thanos-pass.el @@ -43,25 +43,22 @@ (if user (format "sleep 0.3 && xdotool getactivewindow type \"%s\" && xdotool getactivewindow key Tab && xdotool getactivewindow type \"%s\"" user pass) (format "sleep 0.3 && xdotool getactivewindow type 'thanosapollo' && xdotool getactivewindow key Tab && xdotool getactivewindow type \"%s\"" pass)))))) - (let ((ivy-height 100)) + (let ((vertico-count 100)) (unwind-protect - (with-selected-frame - (make-frame '((name . "thanos/pass-launcher") - (minibuffer . only) - (fullscreen . 0) - (undecorated . t) - (internal-border-width . 10) - (width . 80) - (height . 11))) - (let* ((choice (completing-read "Choose an action: " '("AUTO" "COPY PASS" "COPY USERNAME" "EDIT" "GENERATE"))) - (action (pcase choice - ("AUTO" #'pass-autotype) - ("COPY PASS" #'password-store-copy) - ("COPY USERNAME" #'(lambda (entry) (password-store-copy-field entry "user"))) - ("EDIT" #'password-store-edit) - ("GENERATE" #'password-store-generate)))) - (funcall action (completing-read "Search: " (password-store-list))) - (delete-frame))))))) + (with-selected-frame + (make-frame '((name . "thanos/pass-launcher") + (fullscreen . 0) + (undecorated . t) + (minibuffer . only))) + (let* ((choice (completing-read "Choose an action: " '("AUTO" "COPY PASS" "COPY USERNAME" "EDIT" "GENERATE"))) + (action (pcase choice + ("AUTO" #'pass-autotype) + ("COPY PASS" #'password-store-copy) + ("COPY USERNAME" #'(lambda (entry) (password-store-copy-field entry "user"))) + ("EDIT" #'password-store-edit) + ("GENERATE" #'password-store-generate)))) + (funcall action (completing-read "Search: " (password-store-list))) + (delete-frame))))))) (defun smtp-get-pass () "Get password for smtp." @@ -73,6 +70,7 @@ (define-key thanos/pass (kbd "i") 'password-store-insert) (define-key thanos/pass (kbd "e") 'password-store-edit) (define-key thanos/pass (kbd "g") 'password-store-generate) +(define-key thanos/pass (kbd "c") 'password-store-copy) (define-key thanos/pass (kbd "s") 'smtp-get-pass) (defun thanos/app-launcher () |