summaryrefslogtreecommitdiff
path: root/lisp/org-custom.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org-custom.el')
-rw-r--r--lisp/org-custom.el58
1 files changed, 49 insertions, 9 deletions
diff --git a/lisp/org-custom.el b/lisp/org-custom.el
index 6c6b7e4..b6d30a1 100644
--- a/lisp/org-custom.el
+++ b/lisp/org-custom.el
@@ -26,23 +26,47 @@
`(org-document-title ((t (,@headline ,@variable-tuple :height 1.3 :weight bold))))))
- (use-package org-bullets
- :ensure t
- :config
- (org-bullets-mode 1)
- )
+ ;; (use-package org-bullets
+ ;; :ensure t
+ ;; :config
+ ;; (org-bullets-mode 1)
+ ;; )
+
+ (use-package org-modern
+ :ensure t
+ :config
+ (global-org-modern-mode))
+
+ (setq org-ellipsis "…")
+ (set-face-attribute 'org-ellipsis nil :inherit 'default :box nil)
+
+ (setq
+ ;; Edit settings
+ org-auto-align-tags nil
+ org-tags-column 0
+ org-catch-invisible-edits 'show-and-error
+ org-special-ctrl-a/e t
+ org-insert-heading-respect-content t
+
+ ;; Org styling, hide markup etc.
+ org-hide-emphasis-markers t
+ org-pretty-entities t
+ org-agenda-tags-column 0)
(org-indent-mode 1)
(visual-line-mode 1))
+(dolist (dir '("~/OrgRoam" "~/OrgRoam/daily"))
+ (unless (file-directory-p dir)
+ (make-directory (expand-file-name dir) t)))
+
(setq org-directory "~/OrgRoam")
(setq org-agenda-files '("~/OrgRoam" "~/OrgRoam/daily"))
(setq org-default-notes-file (concat org-directory "/inbox.org"))
(setq org-todo-keywords
- '((sequence "TODO" "PROGRESS" "VERIFY" "|" "DONE" "ABANDONED")
- (sequence "IDEA(i)" "QUESTION(q)" "|" "RESOLVED")))
+ '((sequence "TODO" "PROGRESS" "|" "DONE")))
(setq org-return-follows-link t)
@@ -66,6 +90,22 @@
;; alert-default-style 'libnotify)
;; (org-alert-enable))
+(defun my/org-roam-dailies-previous-file ()
+ "Return filename of the most recent existing org-roam daily before today."
+ (let* ((dir (file-name-as-directory org-roam-directory))
+ (time (current-time))
+ (found nil)
+ (i 1))
+ (while (and (not found) (< i 366))
+ (let* ((date (format-time-string "%Y-%m-%d"
+ (time-subtract time (days-to-time i))))
+ (file (expand-file-name (concat date ".org") dir)))
+ (when (file-exists-p file)
+ (setq found file)))
+ (setq i (1+ i)))
+ found))
+
+
(use-package org-roam
:ensure t
:custom
@@ -85,7 +125,7 @@
'(("d" "default" entry
"* %?"
:target (file+head "%<%Y-%m-%d>.org"
- "#+title: %<%Y-%m-%d> 📰 \n#+filetags: :dailies: \n\n* Tasks 🎯\n\n* Notes 📁\n\n"))))
+ "#+title: %<%Y-%m-%d> 📰 \n#+filetags: :dailies: \n\n[[file:%(my/org-roam-dailies-previous-file)][← Previous Day]]\n\n* Tasks 🎯\n\n"))))
(setq org-roam-capture-templates
'(("d" "default" plain
"%?"
@@ -96,7 +136,7 @@
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} 🎫\n #+filetags: :issues:ticket:project:canonical\n")
:unnarrowed t)
("b" "book" plain
- "\n\n* Overview \n "
+ "\n\n* Overview \n\n* Rating \n\n* Links \n "
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} 📚\n #+filetags: :books\n")
:unnarrowed t)))
(org-roam-setup)