diff --git a/lisp/exwm-tagging/exwm-launch-program.el b/lisp/exwm-tagging/exwm-launch-program.el index 2e598a7..240e023 100644 --- a/lisp/exwm-tagging/exwm-launch-program.el +++ b/lisp/exwm-tagging/exwm-launch-program.el @@ -25,26 +25,10 @@ ;;; Code: (use-package dmenu) -(make-thread - #'dmenu--cache-executable-files) - -(defun read-program () - (funcall #'ido-completing-read "$ " - (append dmenu--history-list - (cl-remove-if (lambda (x) - (member x dmenu--history-list)) - dmenu--cache-executable-files)))) - -(defun launch-program (command &optional process-name) - (interactive (list (read-program))) - (setq dmenu--history-list (cons command (remove command dmenu--history-list))) - (when (> (length dmenu--history-list) - dmenu-history-size) - (setcdr (nthcdr (- dmenu-history-size 1) - dmenu--history-list) - nil)) - (let ((name (or process-name command))) - (start-process-shell-command name nil command))) +(defun dmenu-refresh-applist () + (interactive) + (make-thread + #'dmenu--cache-executable-files)) (provide 'exwm-launch-program) ;;; exwm-launch-program.el ends here diff --git a/lisp/exwm-tagging/my-exwmx-quickrun-2.el b/lisp/exwm-tagging/my-exwmx-quickrun-2.el index 26fce8b..fe4fa70 100644 --- a/lisp/exwm-tagging/my-exwmx-quickrun-2.el +++ b/lisp/exwm-tagging/my-exwmx-quickrun-2.el @@ -218,6 +218,17 @@ and :title or just a key list." (interactive) (my/exwmx-quickrun ,cmd nil '(:pretty-name ,name))))) +(add-to-list 'vertico-multiform-commands + '(exwmx-launch-program flat (vertico-cycle . t))) + +(defun read-program () + (completing-read + "$ " + (append dmenu--history-list + (cl-remove-if (lambda (x) + (member x dmenu--history-list)) + dmenu--cache-executable-files)))) + (defun exwmx-launch-program (command &optional process-name) (interactive (list (read-program))) (setq dmenu--history-list (cons command (remove command dmenu--history-list)))