calfw: add 'a' keybinding for org-capture + calendar event template

- New capture template 'c' creates SCHEDULED entry on selected date
- calfw-org-capture-template set for calfw integration
- Events go to calendar_outbox.org (synced via org-caldav twoway)
- Keybinding: a = add event, RET = open agenda day
This commit is contained in:
2026-02-25 15:29:29 +01:00
parent fe859ed252
commit 4f8fd20b0e

View File

@@ -317,7 +317,12 @@
("w" "Weight" table-line ("w" "Weight" table-line
(file+headline ,(ms/org-file "metrics.org") "Weight") (file+headline ,(ms/org-file "metrics.org") "Weight")
"| %U | %^{Weight} | %^{Notes} |" "| %U | %^{Weight} | %^{Notes} |"
:kill-buffer t)))) :kill-buffer t)
("c" "Calendar event" entry
(file ,(ms/org-file "calendar_outbox.org"))
"* %?\nSCHEDULED: %(calfw-org-capture-day)\n"
:empty-lines 1))))
;;; ============================================================ ;;; ============================================================
@@ -1587,6 +1592,12 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
(use-package! calfw-org (use-package! calfw-org
:demand t :demand t
:config :config
;; org-capture integration: "a" to add event on selected date
(setq calfw-org-capture-template
'("c" "Calendar event" entry
(file "~/org/calendar_outbox.org")
"* %?\nSCHEDULED: %(calfw-org-capture-day)\n"))
;; Evil normal state for calfw (SPC = Doom leader works) ;; Evil normal state for calfw (SPC = Doom leader works)
(evil-set-initial-state 'calfw-calendar-mode 'normal) (evil-set-initial-state 'calfw-calendar-mode 'normal)
(evil-set-initial-state 'calfw-details-mode 'normal) (evil-set-initial-state 'calfw-details-mode 'normal)
@@ -1603,6 +1614,7 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
"M" #'calfw-change-view-month "M" #'calfw-change-view-month
"D" #'calfw-change-view-day "D" #'calfw-change-view-day
"TAB" #'calfw-navi-next-item-command "TAB" #'calfw-navi-next-item-command
"a" #'org-capture
"q" #'bury-buffer "q" #'bury-buffer
"x" #'calfw-org-clean-exit "x" #'calfw-org-clean-exit
"RET" #'calfw-org-open-agenda-day "RET" #'calfw-org-open-agenda-day