feature/popup: move default org popup rules to config.el

This commit is contained in:
Henrik Lissner 2018-03-24 04:50:28 -04:00
parent efbd3d69cc
commit 15032aaf60
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 18 additions and 8 deletions

View file

@ -175,7 +175,24 @@ ALIST supports one custom parameter: `size', which will resolve to
;; `help-mode', `helpful-mode'
(+popup-define "^\\*[Hh]elp"
'((slot . 2) (vslot . 2) (size . 0.2))
'((select . t))))
'((select . t)))
;; `org-mode'
;; Use org-load-hook instead of `after!' because the hook runs sooner,
;; allowing users to override these later.
(add-hook! 'org-load-hook
(+popup-define "^\\*\\(?:Agenda Com\\|Calendar\\|Org \\(?:Links\\|Export Dispatcher\\|Select\\)\\)"
'((slot . -1) (vslot . -1) (size . +popup-shrink-to-fit))
'((transient . 0)))
(+popup-define "^\\*Org Agenda"
'((size . 20))
'((select . t) (transient)))
(+popup-define "^\\*Org Src"
'((size . 0.3))
'((quit) (select . t)))
(+popup-define "^CAPTURE.*\\.org$"
'((size . 0.2))
'((quit) (select . t)))))
(add-hook 'doom-init-ui-hook #'+popup-mode)
(add-hook! '+popup-buffer-mode-hook