diff options
| author | Adrian Kummerlaender | 2025-10-26 14:08:18 +0100 |
|---|---|---|
| committer | Adrian Kummerlaender | 2025-10-26 14:08:18 +0100 |
| commit | 69e28944ab4f34eacf428a85c3a75ae442f52b1a (patch) | |
| tree | 78f1cc0887e297508614af2c03028a73d3fbe8a4 /gui/conf/init.el | |
| parent | 7b11a3c50d4451840a236626e3b968ae238d5cbf (diff) | |
| download | nixos_home-69e28944ab4f34eacf428a85c3a75ae442f52b1a.tar nixos_home-69e28944ab4f34eacf428a85c3a75ae442f52b1a.tar.gz nixos_home-69e28944ab4f34eacf428a85c3a75ae442f52b1a.tar.bz2 nixos_home-69e28944ab4f34eacf428a85c3a75ae442f52b1a.tar.lz nixos_home-69e28944ab4f34eacf428a85c3a75ae442f52b1a.tar.xz nixos_home-69e28944ab4f34eacf428a85c3a75ae442f52b1a.tar.zst nixos_home-69e28944ab4f34eacf428a85c3a75ae442f52b1a.zip | |
emacs/niri: Add convenient capture shortcutwayland
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\"" |
