Experimenting with using Emacs as a Rofi replacement; not working correctly--YET!

This commit is contained in:
Derek Taylor
2026-01-01 17:40:54 -06:00
parent a1707fd9d1
commit 42dd1caeca
5 changed files with 55 additions and 14 deletions

View File

@@ -23,7 +23,6 @@
(counsel-linux-app)
(delete-frame))))
;; App-Launcher
;; The 'app-launcher' is a better run launcher since it reads the desktop applications on your system and you can search them by their names as defined in their desktop file. This means that sometimes you have to search for a generic term rather than the actual binary command of the program.
@@ -50,6 +49,10 @@
(app-launcher-run-app)
(delete-frame))))
;; NEW LAUNCHERS
(require 'json) ;; for bookmarks and screenshots
(require 'cl-lib) ;; for screenshots
(defun dt/emacs-generic-launcher (options prompt action-fn)
"Create a minibuffer-only frame to select from OPTIONS with PROMPT.
ACTION-FN is a function that takes the selected string as an argument."
@@ -66,11 +69,20 @@ ACTION-FN is a function that takes the selected string as an argument."
(funcall action-fn selection))
(delete-frame))))
;; NEW LAUNCHERS
(require 'json) ;; for bookmarks and screenshots
(require 'cl-lib) ;; for screenshots
(defun dt/emacs-command-launcher ()
"A global M-x launcher that runs in a dedicated minibuffer frame."
(interactive)
(with-selected-frame
(make-frame '((name . "emacs-command-launcher")
(minibuffer . only)
(undecorated . t)
(width . 80)
(height . 15)
(internal-border-width . 10)))
(unwind-protect
;; execute-extended-command is the built-in M-x
(call-interactively #'execute-extended-command)
(delete-frame))))
(defun dt/get-brave-bookmarks ()
"Parse Brave bookmarks and return an alist of (name . url)."