diff options
Diffstat (limited to 'gui/conf/init.el')
| -rw-r--r-- | gui/conf/init.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gui/conf/init.el b/gui/conf/init.el index fc5e344..1c96458 100644 --- a/gui/conf/init.el +++ b/gui/conf/init.el @@ -248,6 +248,27 @@ "* %:description\n%:link %U" :immediate-finish t))) +(defcustom custom/org-capture-frame-name "**Capture**" + :type 'string) + +(defun custom/org-capture-frame (template) + (interactive '(nil)) + (if (not (equal custom/org-capture-frame-name (frame-parameter nil 'name))) + (make-frame '((name . custom/org-capture-frame-name)))) + (select-frame-by-name custom/org-capture-frame-name) + (delete-other-windows) + (defun org-capture-after-finalize-clean-up () + "Clean up after `org-capture' finalizes. + We delete the dedicated frame and removing advice." + (advice-remove 'org-capture-place-template 'delete-other-windows) + (remove-hook 'org-capture-after-finalize-hook 'org-capture-after-finalize-clean-up) + (select-frame-by-name custom/org-capture-frame-name) + (delete-frame nil t)) + (add-hook 'org-capture-mode-hook 'evil-insert-state) + (add-hook 'org-capture-after-finalize-hook 'org-capture-after-finalize-clean-up) + (advice-add #'org-capture-place-template :after 'delete-other-windows) + (org-capture nil template)) + (setq org-agenda-custom-commands '(("p" "Priorities Dashboard" ((tags-todo "+PRIORITY=\"A\"" |
