summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze2020-12-04 22:00:49 -0500
committerJakob L. Kreuze2020-12-04 22:02:39 -0500
commitf894457395193d2cf1790988b0020b69935c73b1 (patch)
tree29f78ed9395197691618bb82a5941e7aaf314a5f
parent29973258a70efe347698199f3ff9fd9fba8c52c1 (diff)
Use variant of counsel-linux-app for S-p launcher
-rw-r--r--lisp/window-manager.el13
1 files changed, 10 insertions, 3 deletions
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")))

© 2015 - 2026 Jakob L. Kreuze