complete-computing-environment/super_p_runs_commands.org

1.1 KiB

Super-P runs commands

Super-p to run commands without dumping output to a buffer. Super-Shift-P calls counsel-linux-app which will let me launch an application with an icon in my start menu, long desired.

(add-to-list 'display-buffer-alist
             `(,(rx bos " *async command*")
               (display-buffer-no-window)))

(defun background-shell-command (command)
  (interactive (list (read-shell-command "Run: $ ")))
  (async-shell-command command (generate-new-buffer " *async command*")))

(exwm-input-set-key (kbd "s-p") #'background-shell-command)
(global-set-key (kbd "s-p") #'background-shell-command)