From f894457395193d2cf1790988b0020b69935c73b1 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Fri, 4 Dec 2020 22:00:49 -0500 Subject: Use variant of counsel-linux-app for S-p launcher --- lisp/window-manager.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/window-manager.el b/lisp/window-manager.el index 8cecfe9..bc144d5 100644 --- a/lisp/window-manager.el +++ b/lisp/window-manager.el @@ -137,9 +137,16 @@ the same frame, otherwise call out to `exwm-workspace-switch'." ([?\s-d] . my-windmove-right) ([?\s-w] . windmove-up) ([?\s-s] . windmove-down) - ([?\s-p] . (lambda (command) - (interactive (list (read-shell-command "$ "))) - (start-process-shell-command command nil command))) + ([?\s-p] . (lambda (&optional arg) + ;; (interactive (list (read-shell-command "$ "))) + ;; (start-process-shell-command command nil command)) + (interactive "P") + (ivy-read "$ " (counsel-linux-apps-list) + :predicate (unless arg (lambda (x) (get-text-property 0 'visible (car x)))) + :action #'(lambda (prog) + (if (stringp prog) + (start-process-shell-command prog nil prog) + (call-process "gtk-launch" nil 0 nil (cdr prog))))))) ([?\s-X] . (lambda () (interactive) (start-process "" nil "screen-lock"))) -- cgit v1.3