diff options
Diffstat (limited to 'emenu.el')
-rw-r--r-- | emenu.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/emenu.el b/emenu.el index 9d464e4..8d8b92a 100644 --- a/emenu.el +++ b/emenu.el @@ -1,6 +1,6 @@ ;;; emenu.el --- An emacs dmenu clone -*- lexical-binding: t; -*- -;; Copyright © 2022 Erik Oosting +;; Copyright © 2023 Erik Oosting ;; Author: Erik Oosting <crazazy@tilde.cafe> ;; Keywords: application-launcher, misc @@ -39,21 +39,20 @@ (append ls-output alias-output))) ;;;###autoload -(defun emenu (&optional command-list) +(defun emenu (action &optional command-list) "A dmenu-inspired application launcher using a separate emacs frame" - (interactive) + (interactive (list (lambda (command) (call-process command nil 0)))) (with-selected-frame (make-frame '((name . "emenu") (minibuffer . only) (width . 151) (height . 1))) (unwind-protect (progn - (call-process - (ido-completing-read "Command: " (or - command-list - (emenu--all-commands))) - nil - 0) + (funcall action + (ido-completing-read + "Command: " (or + command-list + (emenu--all-commands)))) (keyboard-quit)) (delete-frame)))) |