commit 060d825aa2431efb26ea98a174fdfa14496ec60d
Author: Crazazy <crazazy@tilde.cafe>
Date: Tue, 22 Feb 2022 12:34:20 +0100
[github-elpa] Update archive
Diffstat:
4 files changed, 75 insertions(+), 0 deletions(-)
diff --git a/docs/elpa/archive-contents b/docs/elpa/archive-contents
@@ -0,0 +1,2 @@
+(1
+ (emenu . [(20220221 1604) nil "No description available." single ((:commit . "88e2e1b545646cff1db0f64884b970ccd128a9a3") (:authors ("Erik Oosting" . "crazazy@tilde.cafe")) (:maintainer "Erik Oosting" . "crazazy@tilde.cafe") (:keywords "application-launcher" "misc") (:url . "https://crazazy.tilde.cafe/emenu.git/log.html"))]))+
\ No newline at end of file
diff --git a/docs/elpa/emenu-20220221.1604.el b/docs/elpa/emenu-20220221.1604.el
@@ -0,0 +1,59 @@
+;; emenu.el --- An emacs dmenu clone -*- lexical-binding t -*-
+
+;; Copyright © 2022 Erik Oosting
+
+;; Author: Erik Oosting <crazazy@tilde.cafe>
+;; Keywords: application-launcher, misc
+;; Package-Version: 20220221.1604
+;; Package-Commit: 88e2e1b545646cff1db0f64884b970ccd128a9a3
+;; URL: https://crazazy.tilde.cafe/emenu.git/log.html
+
+;;; License:
+;; This file comes with the MIT license, and without any warranty whatsoever
+;; You can do with this stuff whatever you want to, but just remember
+;; to put me in the footnote :D. Would be nice at least
+
+;;; Commentary:
+;; This is basically what dmenu does, but then in emacs. There is a function 'all-commands'
+;; that gets you all the commands that are on your system. If you instead want to use emenu
+;; on a different list of strings, you can just pass that list to emenu itself and it will
+;; let you select something yourself
+
+(require 'cl-seq)
+(require 'ido)
+
+(defun emenu--all-commands ()
+ "returns a list of all the programs accessible to you in $PATH"
+ ;; This ls-output part was mostly created by phundrak because he found my shell-piping implementation
+ ;; inelegant. If something has to change about this chances are this is going to return to shell
+ ;; scripting again
+ (let ((ls-output (mapcan (lambda (path)
+ (when (file-readable-p path)
+ (cl-remove-if (lambda (file)
+ (let ((fullpath (concat path "/" file)))
+ (or (file-directory-p fullpath)
+ (not (file-executable-p fullpath)))))
+ (directory-files path nil directory-files-no-dot-files-regexp nil))))
+ (split-string (getenv "PATH") ":" t)))
+ (alias-output (split-string (shell-command-to-string "alias -p | sed -E 's/^alias ([^=]*)=.*$/\\1/'") "\n")))
+ (append ls-output alias-output)))
+
+(defun emenu (&optional command-list)
+ "A dmenu-inspired application launcher using a separate emacs frame"
+ (interactive)
+ (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)
+ (keyboard-quit))
+ (delete-frame))))
+
+;;; emenu.el ends here
diff --git a/docs/elpa/emenu-20220221.1604.entry b/docs/elpa/emenu-20220221.1604.entry
@@ -0,0 +1,9 @@
+(emenu .
+ [(20220221 1604)
+ nil "No description available." single
+ ((:commit . "88e2e1b545646cff1db0f64884b970ccd128a9a3")
+ (:authors
+ ("Erik Oosting" . "crazazy@tilde.cafe"))
+ (:maintainer "Erik Oosting" . "crazazy@tilde.cafe")
+ (:keywords "application-launcher" "misc")
+ (:url . "https://crazazy.tilde.cafe/emenu.git/log.html"))])
diff --git a/docs/elpa/emenu-readme.txt b/docs/elpa/emenu-readme.txt
@@ -0,0 +1,4 @@
+This is basically what dmenu does, but then in emacs. There is a function 'all-commands'
+that gets you all the commands that are on your system. If you instead want to use emenu
+on a different list of strings, you can just pass that list to emenu itself and it will
+let you select something yourself