;;; +org.el -*- lexical-binding: t; -*- (require 'org) (custom-set-variables '(org-directory "~/org/")) (defvar +org-capture-work-todo-file "Work/todo.org" "location for my work todo list. This is defined relative to the `org-directory' unless absolute.") (defun +org-capture-work-todo-file () "Expand `+org-capture-work-todo-file' from `org-directory'. If it is an absolute path return `+org-capture-work-todo-file' verbatim." (expand-file-name +org-capture-work-todo-file org-directory)) (setq deft-directory org-directory org-download-image-dir (concat org-directory "resources") org-roam-directory (file-truename "~/org/Roam/")) (setq org-agenda-files (list (concat org-directory "Todos/"))) ;; (setq org-agenda-files (list ;; (concat org-directory +org-capture-work-todo-file ) ;; (concat org-directory "todo.org") ;; ) ;; ) ;(org-agenda-files (file-expand-wildcards (concat org-directory "*". )"~/ref/*.org") ;; Automatically Scan normal locations code for projectes. ;; - `src` is used on my linux machine ;; - `Code` is used on my mac machine ;; - `opt` is used on my where I checkout, and compile, and complain about it ;; not running right, but refuse to the the documentation. (require 'seq) (setq projectile-project-search-path (seq-filter 'file-directory-p '("~/src" "~/Code" "~/opt"))) ;; Make sort reasonable. (setq projectile-sort-order 'access-time) ;; recursive search for deft (setq deft-recursive t) ; Enable word wrap (add-hook 'org-mode-hook #'visual-line-mode) ;Custom bullets (setq org-superstar-headline-bullets-list '("⁜" "☰" "☱" "☲" "☳" "☴" "☵" "☶" "☷")) ;; allow md export (eval-after-load "org" '(require 'ox-md nil t)) ;; org-journal-file-format (customize-set-variable 'org-journal-date-format "%A, %d %B %Y") ;;; Making OrgMode it better looking ; User Mix Pitch Mode for orgmode (add-hook! 'org-mode-hook #'+org-pretty-mode #'mixed-pitch-mode) ; Add Padding (add-hook 'org-mode-hook (lambda () "Add padding left and right margins to orgmode" (display-line-numbers-mode -1) ;(text-scale-set 2) (setq left-margin-width 2) (setq right-margin-width 2) (set-window-buffer nil (current-buffer)))) (custom-set-faces! '(default :height 1) '(org-document-title :height 2.2)) (setq org-agenda-deadline-faces '((1.001 . error) (1.0 . org-warning) (0.5 . org-upcoming-deadline) (0.0 . org-upcoming-distant-deadline))) ;; Added Org-mode (add-hook 'org-mode-hook (lambda () "Beautify Org Checkbox Symbol"` (push '("[ ]" . "☐") prettify-symbols-alist) (push '("[_]" . "☐") prettify-symbols-alist) (push '("[X]" . "☑" ) prettify-symbols-alist) (push '("[-]" . "⊟" ) prettify-symbols-alist) (prettify-symbols-mode))) (setq org-agenda-skip-scheduled-if-done t org-agenda-skip-deadline-if-done t org-agenda-include-deadlines t org-agenda-block-separator nil org-agenda-tags-column 100 ;; from testing this seems to be a good value org-agenda-compact-blocks t) (add-to-list 'org-capture-templates '("w" "Work Todo" entry (file+headline +org-capture-work-todo-file "Inbox") "* [_] %?%i\n%a" :prepend t)) (setq org-roam-directory "~/org/Roam") (load! "org/+babel-diff")