2021-04-02 19:45:01 +00:00
|
|
|
;;; +org.el -*- lexical-binding: t; -*-
|
2020-11-27 20:57:55 +00:00
|
|
|
(require 'org)
|
2020-06-02 00:15:08 +00:00
|
|
|
|
2020-07-09 06:35:03 +00:00
|
|
|
(custom-set-variables '(org-directory "~/org/"))
|
2023-01-01 22:06:33 +00:00
|
|
|
(setq
|
|
|
|
deft-directory org-directory
|
|
|
|
org-download-image-dir (concat org-directory ".attach/")
|
|
|
|
org-roam-directory (concat org-directory "Roam/")
|
|
|
|
)
|
2021-09-14 00:10:46 +00:00
|
|
|
|
2022-09-20 23:27:21 +00:00
|
|
|
(defvar +org-capture-work-todo-file "Work/todo.org"
|
2021-09-14 00:10:46 +00:00
|
|
|
"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))
|
|
|
|
|
|
|
|
|
2022-09-20 23:27:21 +00:00
|
|
|
(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")
|
|
|
|
;; )
|
|
|
|
;; )
|
2020-07-09 04:22:53 +00:00
|
|
|
|
2023-01-01 22:10:36 +00:00
|
|
|
(setq org-agenda-files (list
|
|
|
|
(concat org-directory "Todos/" )
|
|
|
|
)
|
|
|
|
)
|
2020-07-09 06:35:03 +00:00
|
|
|
;(org-agenda-files (file-expand-wildcards (concat org-directory "*". )"~/ref/*.org")
|
2020-07-09 04:22:53 +00:00
|
|
|
;; 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.
|
2020-07-06 00:01:38 +00:00
|
|
|
(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
|
2020-06-29 16:27:35 +00:00
|
|
|
(setq deft-recursive t)
|
2020-07-06 00:01:38 +00:00
|
|
|
|
2021-04-02 19:51:25 +00:00
|
|
|
|
2020-06-02 00:15:08 +00:00
|
|
|
; 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")
|
2021-04-02 19:47:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
;;; 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))))
|
2022-09-20 23:27:41 +00:00
|
|
|
;;
|
2021-04-02 19:47:25 +00:00
|
|
|
(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 ()
|
2021-09-14 00:10:46 +00:00
|
|
|
"Beautify Org Checkbox Symbol"`
|
2021-04-02 19:47:25 +00:00
|
|
|
(push '("[ ]" . "☐") prettify-symbols-alist)
|
2021-09-14 00:10:46 +00:00
|
|
|
(push '("[_]" . "☐") prettify-symbols-alist)
|
2021-04-02 19:47:25 +00:00
|
|
|
(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)
|
2021-09-14 00:10:46 +00:00
|
|
|
|
|
|
|
(add-to-list 'org-capture-templates
|
|
|
|
'("w" "Work Todo" entry
|
|
|
|
(file+headline +org-capture-work-todo-file "Inbox")
|
2021-11-11 20:28:38 +00:00
|
|
|
"* [_] %?%i\n%a" :prepend t))
|
2021-09-14 00:10:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
(load! "org/+babel-diff")
|
2023-01-01 22:03:51 +00:00
|
|
|
(load! "org/+roam-daily")
|