1
0
Fork 0

[oni-org] Clean up agenda category icon settings

This commit is contained in:
Tom Willemse 2023-09-11 21:03:13 -07:00
parent 0d95800422
commit 5391e2cb31

View file

@ -568,44 +568,53 @@ also move point to the start of the heading."
(defun oni-org-set-agenda-category-icons () (defun oni-org-set-agenda-category-icons ()
"Set org-agenda-category-icon-alist." "Set org-agenda-category-icon-alist."
(let* ((icon-height (window-default-font-height))
(defaults `(nil :height ,icon-height :ascent center))
(svg `(svg ,@defaults)))
(setq org-agenda-category-icon-alist (setq org-agenda-category-icon-alist
`((,(rx string-start "task" string-end) ,(expand-file-name "bx-task.svg" oni-org-icons-dir) ,@svg) (mapcar (lambda (pair) (list (rx string-start (literal (car pair)) string-end)
(,(rx string-start "inbox" string-end) ,(expand-file-name "bxs-inbox.svg" oni-org-icons-dir) ,@svg) (expand-file-name (cdr pair) oni-org-icons-dir)
(,(rx string-start "email" string-end) ,(expand-file-name "mat-email.svg" oni-org-icons-dir) ,@svg) 'svg nil
(,(rx string-start "mail" string-end) ,(expand-file-name "mat-email.svg" oni-org-icons-dir) ,@svg) :height (window-default-font-height)
(,(rx string-start "life" string-end) ,(expand-file-name "mat-one-up.svg" oni-org-icons-dir) ,@svg) :ascent 'center))
(,(rx string-start "feature" string-end) ,(expand-file-name "mat-star-circle-outline.svg" oni-org-icons-dir) ,@svg) '(("task" . "bx-task.svg")
(,(rx string-start "work" string-end) ,(expand-file-name "bs-building.svg" oni-org-icons-dir) ,@svg) ("inbox" . "bxs-inbox.svg")
(,(rx string-start "game" string-end) ,(expand-file-name "bxs-game.svg" oni-org-icons-dir) ,@svg) ("email" . "mat-email.svg")
(,(rx string-start "shopping" string-end) ,(expand-file-name "bx-shopping-bag.svg" oni-org-icons-dir) ,@svg) ("mail" . "mat-email.svg")
(,(rx string-start "bug" string-end) ,(expand-file-name "bx-bug.svg" oni-org-icons-dir) ,@svg) ("life" . "mat-one-up.svg")
(,(rx string-start "idea" string-end) ,(expand-file-name "bxs-bulb.svg" oni-org-icons-dir) ,@svg) ("feature" . "mat-star-circle-outline.svg")
(,(rx string-start "article" string-end) ,(expand-file-name "mat-post-outline.svg" oni-org-icons-dir) ,@svg) ("work" . "bs-building.svg")
(,(rx string-start "project" string-end) ,(expand-file-name "bs-kanban.svg" oni-org-icons-dir) ,@svg) ("game" . "bxs-game.svg")
(,(rx string-start "ebook" string-end) ,(expand-file-name "bxs-book-content.svg" oni-org-icons-dir) ,@svg) ("shopping" . "bx-shopping-bag.svg")
(,(rx string-start "book" string-end) ,(expand-file-name "mat-book-open-variant.svg" oni-org-icons-dir) ,@svg) ("bug" . "bx-bug.svg")
(,(rx string-start "Morning Cup of Coding" string-end) ,(expand-file-name "bxs-coffee.svg" oni-org-icons-dir) ,@svg) ("idea" . "bxs-bulb.svg")
(,(rx string-start "paper" string-end) ,(expand-file-name "mat-note-text-outline.svg" oni-org-icons-dir) ,@svg) ("article" . "mat-post-outline.svg")
(,(rx string-start "question" string-end) ,(expand-file-name "mat-head-question.svg" oni-org-icons-dir) ,@svg) ("project" . "bs-kanban.svg")
(,(rx string-start "music" string-end) ,(expand-file-name "bxs-music.svg" oni-org-icons-dir) ,@svg) ("ebook" . "bxs-book-content.svg")
(,(rx string-start "emacs" string-end) ,(expand-file-name "emacs.svg" oni-org-icons-dir) ,@svg) ("book" . "mat-book-open-variant.svg")
(,(rx string-start "guix" string-end) ,(expand-file-name "guix.svg" oni-org-icons-dir) ,@svg) ("Morning Cup of Coding" . "bxs-coffee.svg")
(,(rx string-start "moving" string-end) ,(expand-file-name "bxs-truck.svg" oni-org-icons-dir) ,@svg) ("paper" . "mat-note-text-outline.svg")
(,(rx string-start "security" string-end) ,(expand-file-name "mat-security.svg" oni-org-icons-dir) ,@svg) ("question" . "mat-head-question.svg")
(,(rx string-start "website" string-end) ,(expand-file-name "mat-web.svg" oni-org-icons-dir) ,@svg) ("music" . "bxs-music.svg")
(,(rx string-start "desktop" string-end) ,(expand-file-name "bx-desktop.svg" oni-org-icons-dir) ,@svg) ("emacs" . "emacs.svg")
(,(rx string-start "maint" string-end) ,(expand-file-name "bs-tools.svg" oni-org-icons-dir) ,@svg) ("guix" . "guix.svg")
(,(rx string-start "comm" string-end) ,(expand-file-name "bs-telephone-fill.svg" oni-org-icons-dir) ,@svg) ("moving" . "bxs-truck.svg")
(,(rx string-start "config" string-end) ,(expand-file-name "bx-cog.svg" oni-org-icons-dir) ,@svg) ("security" . "mat-security.svg")
(,(rx string-start "blog" string-end) ,(expand-file-name "bx-rss.svg" oni-org-icons-dir) ,@svg) ("website" . "mat-web.svg")
(,(rx string-start "writing" string-end) ,(expand-file-name "bxs-pencil.svg" oni-org-icons-dir) ,@svg) ("desktop" . "bx-desktop.svg")
(,(rx string-start "code" string-end) ,(expand-file-name "code.svg" oni-org-icons-dir) ,@svg) ("maint" . "bs-tools.svg")
(,(rx string-start "list" string-end) ,(expand-file-name "list.svg" oni-org-icons-dir) ,@svg) ("comm" . "bs-telephone-fill.svg")
(,(rx string-start "video" string-end) ,(expand-file-name "video-fill.svg" oni-org-icons-dir) ,@svg) ("config" . "bx-cog.svg")
(,(rx string-start "album" string-end) ,(expand-file-name "album-fill.svg" oni-org-icons-dir) ,@svg))))) ("blog" . "bx-rss.svg")
("writing" . "bxs-pencil.svg")
("code" . "code.svg")
("list" . "list.svg")
("video" . "video-fill.svg")
("album" . "album-fill.svg")))))
(defun oni-org-roam-todo-files ()
"Collect all files that have TODO items in them."
(mapcar
#'car
(org-roam-db-query
[:select :distinct file :from nodes :where (= todo $s1)] "TODO")))
(setq org-agenda-files (setq org-agenda-files
(cons oni-org-todo-main-file (cons oni-org-todo-main-file