Skip to content

Instantly share code, notes, and snippets.

@bradmont
Created February 27, 2026 18:28
Show Gist options
  • Select an option

  • Save bradmont/0a27fa01d845e2fbffd53e7e8972ed7e to your computer and use it in GitHub Desktop.

Select an option

Save bradmont/0a27fa01d845e2fbffd53e7e8972ed7e to your computer and use it in GitHub Desktop.
;;; ../../Sync/config/.config/doom/+org-agenda-config.el -*- lexical-binding: t; -*-
;;;;; Inspired by : https://github.com/psamim/dotfiles/blob/master/doom/config.el
;;;;; And the related reddit post here:
;;;;; https://www.reddit.com/r/emacs/comments/hnf3cw/my_orgmode_agenda_much_better_now_with_category/
;;;;;;;;;;;;;; Base config
;; Set agenda files/directories
(use-package org-agenda
:after org
:config
(use-package org-duration)
(setq org-agenda-files '("~/Sync/Notes/feeds.org"
"~/Sync/Notes/journal.org"
"~/Sync/Notes/Orgzly/orgzly capture.org"
))
(setq org-agenda-files
(append
'("~/Sync/Notes/feeds.org"
"~/Sync/Notes/journal.org"
"~/Sync/Notes/Orgzly/orgzly capture.org")
(directory-files-recursively
"~/src/"
"project_management.org$")
(directory-files-recursively
"~/Sync/Projets/"
"project_management.org$")))
(setq org-contacts-files '("~/Sync/Notes/contacts.org" ))
(setq org-archive-location '"~/Sync/Notes/agenda_archive.org::"
)
)
;;; Defines my sections
(setq org-agenda-custom-commands
'(("d" "Do today + workflow overview"
(
(todo "PROJ"
((org-agenda-overriding-header "Projects")))
(agenda ""
((org-agenda-show-all-dates nil)
(org-agenda-show-future-repeats nil)
(org-agenda-skip-function
(lambda ()
(when (member (org-get-todo-state)
'("PROJ" "SOMEDAY"))
(or (outline-next-heading) (point-max)))))
(org-agenda-overriding-header "")
))
(todo "DRAFT|PROOFREAD|POST|PUBLISH"
((org-agenda-overriding-header "Writing")
(org-agenda-max-entries 5) ))
(todo "READQUEUE|SUMMARIZE|SKIM"
((org-agenda-overriding-header "Next Reading")
(org-agenda-max-entries 5) ))
(todo "SOMEDAY"
((org-agenda-overriding-header "Someday")))))))
;;;;;;;;;;;;;;;;;; Prettify org-agenda:
;;;;;;;;;;;;;;;;;;
(after! org
(setq org-agenda-scheduled-leaders '("" "-%2d"))
)
(setq org-agenda-prefix-format
'((agenda . " %i %?-2t%s ")
(todo . " %i %?-2t%s ")
(tags . " ")
(search . " ")))
;;; Display only one-char TODO states
(setq org-agenda-todo-keyword-format "%.1s")
;;; hide tags
(setq org-agenda-remove-tags t)
;; hide mode-line
(hide-mode-line-mode 1)
(defun my/org-agenda-late-extra (orig-fn extra txt &rest args)
(let* ((marker (or extra ""))
(agenda-extra
(let ((d (when (stringp extra)
(abs (string-to-number extra)))))
(cond
((not d) "")
((= d 0) "")
((< d 3) " •")
((< d 7) " !")
((< d 14) " ‼")
(t " ✖")))))
(apply orig-fn agenda-extra txt args)))
(advice-add 'org-agenda-format-item :around
#'my/org-agenda-late-extra)
(add-hook 'org-agenda-mode-hook
(lambda ()
(setq-local line-spacing 0.5)
(buffer-face-set '(:family "Lato"))
))
(setq org-agenda-block-separator "")
;;; single blank line between blocks
(defun my/org-agenda-fix-block-spacing ()
(goto-char (point-min))
(while (re-search-forward "\n\n\n+" nil t)
(replace-match "\n\n")))
(add-hook 'org-agenda-finalize-hook
#'my/org-agenda-fix-block-spacing)
;;; Category icons
;;; I don't have copyright to distribute the icons. psamin has some on his github, the rest come
;;; from the same site he got his from.
(customize-set-value
'org-agenda-category-icon-alist
`(
("work" "~/.config/icons/work.svg" nil nil :ascent center :mask heuristic)
("chat" "~/.config/icons/chat.svg" nil nil :ascent center :mask heuristic)
("letter" "~/.config/icons/letter.svg" nil nil :ascent center :mask heuristic)
("music" "~/.config/icons/music.svg" nil nil :ascent center :mask heuristic)
("chore" "~/.config/icons/chore.svg" nil nil :ascent center :mask heuristic)
("events" "~/.config/icons/events.svg" nil nil :ascent center :mask heuristic)
("inbox" "~/.config/icons/inbox.svg" nil nil :ascent center :mask heuristic)
("run" "~/.config/icons/walk.svg" nil nil :ascent center :mask heuristic)
("fund" "~/.config/icons/piggy-bank.svg" nil nil :ascent center :mask heuristic)
("solution" "~/.config/icons/solution.svg" nil nil :ascent center :mask heuristic)
("community" "~/.config/icons/community.svg" nil nil :ascent center :mask heuristic)
("idea" "~/.config/icons/idea.svg" nil nil :ascent center :mask heuristic)
("man" "~/.config/icons/man.svg" nil nil :ascent center :mask heuristic)
("personal" "~/.config/icons/man.svg" nil nil :ascent center :mask heuristic)
("scheduled" "~/.config/icons/scheduled.svg" nil nil :ascent center :mask heuristic)
("class" "~/.config/icons/class.svg" nil nil :ascent center :mask heuristic)
("school" "~/.config/icons/class.svg" nil nil :ascent center :mask heuristic)
("graduation" "~/.config/icons/graduation.svg" nil nil :ascent center :mask heuristic)
("plant" "~/.config/icons/plant.svg" nil nil :ascent center :mask heuristic)
("check" "~/.config/icons/check.svg" nil nil :ascent center :mask heuristic)
("search" "~/.config/icons/search.svg" nil nil :ascent center :mask heuristic)
("home" "~/.config/icons/home.svg" nil nil :ascent center :mask heuristic)
("Book" "~/.config/icons/book.svg" nil nil :ascent center :mask heuristic)
("cook" "~/.config/icons/cook.svg" nil nil :ascent center :mask heuristic)
("buy" "~/.config/icons/buy.svg" nil nil :ascent center :mask heuristic)
("shower" "~/.config/icons/shower.svg" nil nil :ascent center :mask heuristic)
("swim" "~/.config/icons/swim.svg" nil nil :ascent center :mask heuristic)
("archive" "~/.config/icons/archive.svg" nil nil :ascent center :mask heuristic)
("journal" "~/.config/icons/checklist.svg" nil nil :ascent center :mask heuristic)
("feeds" "~/.config/icons/news.svg" nil nil :ascent center :mask heuristic)
("proofread" "~/.config/icons/search_book.svg" nil nil :ascent center :mask heuristic)
("read" "~/.config/icons/library.svg" nil nil :ascent center :mask heuristic)
("write" "~/.config/icons/letter2.svg" nil nil :ascent center :mask heuristic)
("emacs" "~/.config/icons/gnu.svg" nil nil :ascent center :mask heuristic)
("code" "~/.config/icons/computer.svg" nil nil :ascent center :mask heuristic)
("church" "~/.config/icons/church.svg" nil nil :ascent center :mask heuristic)
("bible" "~/.config/icons/bible.svg" nil nil :ascent center :mask heuristic)
("preach" "~/.config/icons/bible.svg" nil nil :ascent center :mask heuristic)
("teach" "~/.config/icons/professor.svg" nil nil :ascent center :mask heuristic)
("someday" "~/.config/icons/time.svg" nil nil :ascent center :mask heuristic)
("project" "~/.config/icons/sketching.svg" nil nil :ascent center :mask heuristic)
("rocket" "~/.config/icons/rocket.svg" nil nil :ascent center :mask heuristic)
("important" "~/.config/icons/rocket.svg" nil nil :ascent center :mask heuristic)
))
;;;;;; To open a dedicated agenda emacs instance
;;;;;; with $ emacs --eval '(my/agenda-app)' --no-splash
;;;;;; or a desktop shortcut
(defun my/agenda-app ()
(interactive)
(set-frame-name "Agenda")
(delete-other-windows)
(org-agenda nil "d") ;; your custom dashboard
(delete-other-windows)
(setq mode-line-format nil)
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(when (bound-and-true-p tab-bar-mode)
(tab-bar-mode -1))
(load-theme 'doom-tomorrow-night)
(buffer-face-set '(:family "Lato"))
(text-scale-increase 2)
(hide-mode-line-mode 1)
(winner-mode 1)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment