diff --git a/modules/feature/popup/+hacks.el b/modules/feature/popup/+hacks.el index 47ded5e64..e2929635f 100644 --- a/modules/feature/popup/+hacks.el +++ b/modules/feature/popup/+hacks.el @@ -166,13 +166,6 @@ the command buffer." ;; `org' (after! org - (set! :popup "^\\*\\(?:Agenda Com\\|Calendar\\|Org \\(?:Links\\|Export Dispatcher\\|Select\\)\\)" - '((slot . -1) (vslot . -1) (size . +popup-shrink-to-fit)) - '((transient . 0))) - (set! :popup "^\\*Org Agenda" '((size . 20)) '((select . t) (transient))) - (set! :popup "^\\*Org Src" '((size . 0.3)) '((quit) (select . t))) - (set! :popup "^CAPTURE.*\\.org$" '((size . 0.2)) '((quit) (select . t))) - ;; Org has a scorched-earth window management system I'm not fond of. i.e. it ;; kills all windows and monopolizes the frame. No thanks. We can do better ;; ourselves. diff --git a/modules/feature/popup/config.el b/modules/feature/popup/config.el index 25257ebe1..af36af79c 100644 --- a/modules/feature/popup/config.el +++ b/modules/feature/popup/config.el @@ -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