Add Org agenda and dashboard integration

This commit is contained in:
Fabio Scotto di Santolo
2026-04-19 21:36:14 +02:00
parent 7c36681242
commit 8ed4ce7887
3 changed files with 34 additions and 7 deletions

View File

@@ -11,6 +11,14 @@
(define-key global-map (kbd "C-c") fscotto/leader-map)
;;;; Org
(autoload 'org-agenda "org" nil t)
(autoload 'org-capture "org-capture" nil t)
(define-key fscotto/leader-map (kbd "a") #'org-agenda)
(define-key fscotto/leader-map (kbd "c") #'org-capture)
;;;; Git / Magit
(defun fscotto/enable-magit-keymap ()
"Enable Git keybindings if current buffer is inside a Git repository."

View File

@@ -3,11 +3,15 @@
(use-package htmlize
:ensure t)
;; Setting default directory for Org files.
(setq org-directory "~/Org")
(use-package org
:init
(setq org-clock-mode-line-total 'today
org-fontify-quote-and-verse-blocks t
org-indent-mode t
org-agenda-skip-unavailable-files t
org-return-follows-link t
org-startup-folded 'content
org-todo-keywords '((sequence "🆕(t)" "▶️(s)" "⏳(w)" "🔎(p)" "|" "✅(d)" "🗑(c)" "👨(g)"))
@@ -16,7 +20,21 @@
"pdflatex -interaction nonstopmode %f")
org-latex-default-class "article"
org-html-doctype "html5"
org-html-html5-fancy t)
org-html-html5-fancy t
org-default-notes-file (expand-file-name "inbox.org" org-directory)
org-agenda-files (mapcar (lambda (file)
(expand-file-name file org-directory))
'("inbox.org" "tasks.org" "calendar.org" "notes.org"))
org-capture-templates
'(("t" "Task" entry
(file org-default-notes-file)
"* 🆕 %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n")
("n" "Note" entry
(file (expand-file-name "notes.org" org-directory))
"* %U %?\n")
("e" "Event" entry
(file (expand-file-name "calendar.org" org-directory))
"* %?\nSCHEDULED: %^T\n")))
:config
(add-hook 'org-mode-hook 'org-indent-mode))
@@ -42,10 +60,6 @@
'((mermaid . t)
(scheme . t))))
;; Setting default directory for Org files
(setq org-directory "~/Org")
(provide 'org)
;;; org.el ends here

View File

@@ -11,8 +11,13 @@
dashboard-center-content t
dashboard-set-heading-icons t
dashboard-set-file-icons t
dashboard-items '((recents . 8)
(projects . 5)))
dashboard-path-style 'truncate-middle
dashboard-path-max-length 60
dashboard-week-agenda t
dashboard-agenda-prefix-format " %-10:c %s "
dashboard-agenda-time-string-format "%a %d %b"
dashboard-items '((recents . 8)
(agenda . 5)))
:config
(dashboard-setup-startup-hook))