; ;;; Code: (require 'org) (defun org-custom-hook() "Custom org mode hook." (setq org-hide-emphasis-markers t) (let* ((variable-tuple (cond ((x-list-fonts "Iosevka") '(:font "Iosevka")) ((x-list-fonts "Monaco") '(:font "Monaco")) ((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro")))) (base-font-color (face-foreground 'default nil 'default)) (headline `(:inherit default :weight normal :foreground ,base-font-color :extend t :background nil :box nil))) (custom-theme-set-faces 'user `(org-level-8 ((t (,@headline ,@variable-tuple)))) `(org-level-7 ((t (,@headline ,@variable-tuple)))) `(org-level-6 ((t (,@headline ,@variable-tuple)))) `(org-level-5 ((t (,@headline ,@variable-tuple)))) `(org-level-4 ((t (,@headline ,@variable-tuple :height 1.0)))) `(org-level-3 ((t (,@headline ,@variable-tuple :height 1.1)))) `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.2 :weight bold)))) `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.3 :weight bold)))) `(org-document-title ((t (,@headline ,@variable-tuple :height 1.3 :weight bold)))))) (use-package org-bullets :ensure t :config (org-bullets-mode 1) ) (org-indent-mode 1) (visual-line-mode 1)) (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"))) (setq org-return-follows-link t) (add-hook 'org-mode-hook 'org-custom-hook) (setq org-src-fontify-natively t) (setq-default org-startup-indented t org-pretty-entities t org-use-sub-superscripts "{}" org-hide-emphasis-markers t org-startup-with-inline-images t org-image-actual-width '(300)) (setq org-blank-before-new-entry '((heading . t) (plain-list-item . nil))) ;; (use-package org-alert ;; :ensure t ;; :config ;; (setq org-alert-interval 36000 ; Once per hour! ;; alert-default-style 'libnotify) ;; (org-alert-enable)) (use-package org-roam :ensure t :custom (org-roam-directory "~/OrgRoam") :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) ("C-c n i" . org-roam-node-insert) ("C-c n g" . org-roam-graph) ("C-c n j" . org-roam-dailies-goto-today) ("C-c n t" . org-roam-tag-add) ("C-c n a" . org-roam-alias-add) ("C-c n c" . org-capture) ("C-c n r" . org-roam-refile)) :config (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags}" 'face 'org-tag))) (setq org-roam-dailies-capture-templates '(("d" "default" entry "* %?" :target (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d> 📰 \n#+filetags: :dailies: \n\n* Timeline 🍞\n\n* Notes 📁\n\n* Questions ❓\n\n")))) (setq org-roam-capture-templates '(("d" "default" plain "%?" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :unnarrowed t) ("i" "issue" plain "\n\n* Links 🔗\n- *Ticket*: \n- *JIRA*: \n- *Pull Request*: \n\n* Goals ⚽\n\n* TODOs 🔏\n\n* Observations 🔭 \n\n* Code structure 🏠\n\n* Possible Solutions 🤔\n\n* Resources 🔧\n\n" :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 " :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} 📚\n #+filetags: :books\n") :unnarrowed t))) (org-roam-setup) ) (setq org-capture-templates '(("t" "Todo" entry (file+headline org-default-notes-file "Tasks") "* TODO %?\n DEADLINE: %t") ("n" "Quick Notes" entry (file+headline org-default-notes-file "Quick Notes") "* %?\n Created on %U\n %i"))) (defun org-archive-done-tasks () "Archive all done tasks in an org subtree" (interactive) (org-map-entries (lambda () (org-archive-subtree) (setq org-map-continue-from (org-element-property :begin (org-element-at-point)))) "/DONE" 'tree)) (use-package org-download :ensure t) (setq org-log-repeat nil) (provide 'org-custom) ;;; org-custom.el ends here