diff options
| author | Jakob L. Kreuze | 2020-12-04 22:00:49 -0500 |
|---|---|---|
| committer | Jakob L. Kreuze | 2020-12-04 22:02:39 -0500 |
| commit | f894457395193d2cf1790988b0020b69935c73b1 (patch) | |
| tree | 29f78ed9395197691618bb82a5941e7aaf314a5f | |
| parent | 29973258a70efe347698199f3ff9fd9fba8c52c1 (diff) | |
Use variant of counsel-linux-app for S-p launcher
| -rw-r--r-- | lisp/window-manager.el | 13 |
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"))) |