--- a/util/pass/pass.lisp
+++ b/util/pass/pass.lisp
@@ -23,17 +23,94 @@ Directory Specification. Tries $PASSWORD_STORE_DIR then $HOME/.password-store/."
                                :name :wild
                                :type "gpg")))))
 
-(stumpwm:defcommand pass-copy () ()
-  "Put a password into the clipboard."
-  (let ((entry (stumpwm:completing-read (stumpwm:current-screen)
-                                        "entry: "
-                                        (pass-entries)
-                                        :initial-input ""
-                                        :require-match t)))
+(stumpwm:defcommand username-type () ()
+  "Put a username into the clipboard."
+  (let ((entry (stumpwm:select-from-menu
+                (stumpwm:current-screen)
+                (mapcar 'list (pass-entries))
+                "Type username: ")))
+    (when entry
+      (let* ((data (stumpwm:run-shell-command (format nil "pass show ~a" (car entry)) t))
+             (u (search "username:" data)))
+       (if u
+         (let* ((first-username (subseq data u))
+                (nl (position #\Newline first-username))
+                (colon (search ":" first-username))
+                (username (subseq first-username (+ 1 colon) nl)))
+           (stumpwm:run-shell-command (format nil "echo \"~a\" | xdotool type --clearmodifiers --file -" username)))
+         (stumpwm:message "This entry doesn't have a username."))))))
+
+(stumpwm:defcommand username-copy () ()
+  "Put a username into the clipboard."
+  (let ((entry (stumpwm:select-from-menu
+                (stumpwm:current-screen)
+                (mapcar 'list (pass-entries))
+                "Copy username to clipboard: ")))
+    (when entry
+      (let* ((data (stumpwm:run-shell-command (format nil "pass show ~a" (car entry)) t))
+             (u (search "username:" data)))
+       (if u
+         (let* ((first-username (subseq data u))
+                (nl (position #\Newline first-username))
+                (colon (search ":" first-username))
+                (username (subseq first-username (+ 1 colon) nl)))
+           (stumpwm:run-shell-command (format nil "echo \"~a\" | xclip" username)))
+         (stumpwm:message "This entry doesn't have a username."))))))
+
+(stumpwm:defcommand url-type () ()
+  "Put a type url into current window."
+  (let ((entry (stumpwm:select-from-menu
+                (stumpwm:current-screen)
+                (mapcar 'list (pass-entries))
+                "Type url: ")))
     (when entry
-      (stumpwm:run-shell-command (format nil "pass -c ~a" entry)))))
+      (let* ((data (stumpwm:run-shell-command (format nil "pass show ~a" (car entry)) t))
+             (u (search "url:" data)))
+       (if u
+         (let* ((first-url (subseq data u))
+                (nl (position #\Newline first-url))
+                (colon (search ":" first-url))
+                (url (subseq first-url (+ 1 colon) nl)))
+           (stumpwm:run-shell-command (format nil "echo \"~a\" | xdotool type --clearmodifiers --file -" url)))
+         (stumpwm:message "This entry doesn't have a url."))))))
+
+(stumpwm:defcommand url-copy () ()
+  "Put a url into the clipboard."
+  (let ((entry (stumpwm:select-from-menu
+                (stumpwm:current-screen)
+                (mapcar 'list (pass-entries))
+                "Copy url to clipboard: ")))
+    (when entry
+      (let* ((data (stumpwm:run-shell-command (format nil "pass show ~a" (car entry)) t))
+             (u (search "url:" data)))
+       (if u
+         (let* ((first-url (subseq data u))
+                (nl (position #\Newline first-url))
+                (colon (search ":" first-url))
+                (url (subseq first-url (+ 1 colon) nl)))
+           (stumpwm:run-shell-command (format nil "echo \"~a\" | xclip" url)))
+         (stumpwm:message "This entry doesn't have a url."))))))
+
+;; (stumpwm:defcommand pass-copy () ()
+;;   "Put a password into the clipboard."
+;;   (let ((entry (stumpwm:completing-read (stumpwm:current-screen)
+;;                                         "entry: "
+;;                                         (pass-entries)
+;;                                         :initial-input ""
+;;                                         :require-match t)))
+;;     (when entry
+;;       (stumpwm:run-shell-command (format nil "pass -c ~a" entry)))))
 
-(stumpwm:defcommand pass-copy-menu () ()
+(stumpwm:defcommand pass-type () ()
+  "Select a password entry from a menu and type the password into the current window."
+  (let ((entry (stumpwm:select-from-menu
+                (stumpwm:current-screen)
+                (mapcar 'list (pass-entries))
+                "Type password: ")))
+    (when entry
+      (stumpwm:run-shell-command (format nil "pass show ~a | head -n 1 | xdotool type --clearmodifiers --file -" (car entry))))))
+
+(stumpwm:defcommand pass-copy () ()
   "Select a password entry from a menu and copy the password into the clipboard."
   (let ((entry (stumpwm:select-from-menu
                 (stumpwm:current-screen)
