EXWM: Make helm-pass prompt contextual

master
Pierre Neidhardt 2018-02-15 23:40:33 +01:00
parent 52ae8b5569
commit e1504d6472
1 changed files with 9 additions and 3 deletions

View File

@ -94,15 +94,21 @@
(if (fboundp 'helm-emms)
(exwm-input-set-key (kbd "s-A") #'helm-emms)
(exwm-input-set-key (kbd "s-A") #'emms)))
(when (fboundp 'helm-pass)
(exwm-input-set-key (kbd "s-p") #'helm-pass))
(when (delq nil (mapcar (lambda (path) (string-match "/mu4e/\\|/mu4e$" path)) load-path))
(exwm-input-set-key (kbd "s-m") #'ambrevar/mu4e-headers))
(exwm-input-set-key (kbd "s-n") #'ambrevar/elfeed-switch-back) ; "n" for "news"
(exwm-input-set-key (kbd "s-e") #'ambrevar/eww-switch-back)
(exwm-input-set-key (kbd "s-E") #'eww)
(when (fboundp 'helm-pass)
(defun ambrevar/helm-pass-for-page ()
"Default prompt to current exwm-title"
(interactive)
(helm :sources 'helm-source-pass
:input (and exwm-title
(car (last (split-string exwm-title " "))))
:buffer "*helm-pass*"))
(exwm-input-set-key (kbd "s-p") #'ambrevar/helm-pass-for-page))
;;; External application shortcuts.
(defun ambrevar/exwm-start (command)