~azzamsa/scripts.el

fe7fd65808a145e21979f2dfcbb4332cbdeb0d8f — azzamsa 4 months ago 0aa5225
remove `get-pass`

Now I am using pass
1 files changed, 0 insertions(+), 19 deletions(-)

M aza-scripts.el
M aza-scripts.el => aza-scripts.el +0 -19
@@ 185,23 185,4 @@ Reduce Distraction."
      (dired (concat "/ssh:" username "@" ip-address ":/home/" username "/")))
    (message "Connected")))

(defun get-pass ()
  "Copy username and password to clipboard"
  (interactive)
  (let* ((keys `((name . "")
                 (candidates . ,(mapcar 'car aza-keys))
                 (action . (lambda (candidate)
                             candidate))))
         (selected-key (helm :sources '(keys)))
         (pass-data (cdr (assoc selected-key aza-keys)))
         (username (plist-get pass-data :username))
         (pass (plist-get pass-data :pass)))
    (if (not username)
        (kill-new aza-default-username)
      (kill-new username))
    (if (not pass)
        (message "%s password not found" selected-key)
      (kill-new pass))
    (message "Copied %s %s" username pass)))

(provide 'aza-scripts)