2024-02-01 15:50:30 +01:00
|
|
|
#+TITLE: Literate Doom Emacs Config
|
|
|
|
#+AUTHOR: Inhji
|
|
|
|
#+PROPERTY: header-args :tangle config.el
|
2024-02-02 09:28:35 +01:00
|
|
|
#+auto_tangle: t
|
2024-02-01 15:50:30 +01:00
|
|
|
|
2024-02-02 09:28:35 +01:00
|
|
|
* Table of contents :toc:
|
|
|
|
- [[#notes][Notes]]
|
2024-02-05 13:22:49 +01:00
|
|
|
- [[#config-basics][Config Basics]]
|
2024-02-02 09:28:35 +01:00
|
|
|
- [[#appearance][Appearance]]
|
|
|
|
- [[#org-mode][Org Mode]]
|
2024-02-05 13:22:49 +01:00
|
|
|
- [[#org-basics][Org Basics]]
|
2024-02-02 09:28:35 +01:00
|
|
|
- [[#org-agenda][Org Agenda]]
|
|
|
|
- [[#org-auto-tangle][Org Auto Tangle]]
|
|
|
|
- [[#org-capture][Org Capture]]
|
|
|
|
- [[#org-directory][Org Directory]]
|
|
|
|
- [[#org-hooks][Org Hooks]]
|
|
|
|
|
|
|
|
* Notes
|
|
|
|
|
|
|
|
Remember, you do not need to run 'doom sync' after modifying this file!
|
2024-02-01 15:50:30 +01:00
|
|
|
|
2024-02-05 13:22:49 +01:00
|
|
|
* Config Basics
|
2024-02-01 15:50:30 +01:00
|
|
|
|
2024-02-02 09:28:35 +01:00
|
|
|
This codeblock should be the first in this file!
|
|
|
|
|
2024-02-01 15:50:30 +01:00
|
|
|
#+begin_src emacs-lisp
|
|
|
|
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq user-full-name "Jonathan Jenne"
|
|
|
|
user-mail-address "johnnie@posteo.de")
|
2024-02-02 09:28:35 +01:00
|
|
|
|
2024-02-05 13:22:49 +01:00
|
|
|
(setq +user-org-path "~/Notes/Org"
|
|
|
|
+user-org-todo-file "Todo.org"
|
|
|
|
+user-org-notes-file "Notes.org"
|
|
|
|
+user-org-journal-file "Journal.org")
|
|
|
|
|
2024-02-02 09:28:35 +01:00
|
|
|
(setq shell-file-name (executable-find "bash"))
|
2024-02-01 15:50:30 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
* Appearance
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
2024-02-02 09:28:35 +01:00
|
|
|
(setq display-line-numbers-type t)
|
2024-02-01 15:50:30 +01:00
|
|
|
(setq doom-theme 'doom-one)
|
|
|
|
#+end_src
|
|
|
|
|
2024-02-02 09:28:35 +01:00
|
|
|
* Org Mode
|
2024-02-01 15:50:30 +01:00
|
|
|
|
2024-02-05 13:22:49 +01:00
|
|
|
** Org Basics
|
|
|
|
*** TAB uses the language's major-mode binding in code blocks
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-src-tab-acts-natively t)
|
|
|
|
#+end_src
|
|
|
|
|
2024-02-02 09:28:35 +01:00
|
|
|
** Org Agenda
|
2024-02-01 15:50:30 +01:00
|
|
|
|
2024-02-05 13:22:49 +01:00
|
|
|
To have a less overwhelming agenda, show only TODOs for today and tomorrow. DONE items are not interesting, so they are also hidden.
|
|
|
|
|
2024-02-02 09:28:35 +01:00
|
|
|
#+begin_src emacs-lisp
|
2024-02-01 15:50:30 +01:00
|
|
|
(after! org (setq
|
|
|
|
org-agenda-show-all-dates nil
|
|
|
|
org-agenda-span 2
|
|
|
|
org-agenda-start-day "+0d"
|
|
|
|
org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)
|
|
|
|
org-agenda-time-grid
|
|
|
|
'((daily today require-timed)
|
|
|
|
(800 1000 1200 1400 1600 1800 2000)
|
|
|
|
" ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
|
|
|
|
org-agenda-current-time-string
|
|
|
|
"◀── now ──────────────────────────────────────────────── \\o/"
|
|
|
|
org-agenda-block-separator ?─
|
|
|
|
;; Consider all org files part of the org-agenda
|
2024-02-05 13:22:49 +01:00
|
|
|
org-agenda-files (list +user-org-path)))
|
2024-02-02 09:28:35 +01:00
|
|
|
#+end_src
|
2024-02-01 15:50:30 +01:00
|
|
|
|
2024-02-02 09:28:35 +01:00
|
|
|
** Org Auto Tangle
|
2024-02-01 15:50:30 +01:00
|
|
|
|
2024-02-05 13:22:49 +01:00
|
|
|
Only tangle org files where it has been explicitly enabled, like this config file
|
|
|
|
|
2024-02-02 09:28:35 +01:00
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-auto-tangle-default nil)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Org Capture
|
|
|
|
|
2024-02-05 13:22:49 +01:00
|
|
|
*** Capture Files
|
|
|
|
|
2024-02-02 09:28:35 +01:00
|
|
|
#+begin_src emacs-lisp
|
2024-02-05 13:22:49 +01:00
|
|
|
(after! org (setq +org-capture-notes-file (expand-file-name +user-org-notes-file +user-org-path)
|
|
|
|
+org-capture-todo-file (expand-file-name +user-org-todo-file +user-org-path)
|
|
|
|
+org-capture-journal-file (expand-file-name +user-org-journal-file +user-org-path)))
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
*** Capture Templates
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq org-capture-templates
|
|
|
|
'(("t" "Personal todo" entry
|
|
|
|
(file+headline +org-capture-todo-file "Inbox")
|
|
|
|
"* TODO %?\n" :prepend t)
|
|
|
|
|
|
|
|
("n" "Personal notes" entry
|
|
|
|
(file+headline +org-capture-notes-file "Inbox")
|
|
|
|
"* %u %?\n" :prepend t)
|
|
|
|
|
|
|
|
("j" "Journal" entry
|
|
|
|
(file+olp+datetree +org-capture-journal-file)
|
|
|
|
"* %U %?\n" :prepend t)))
|
2024-02-02 09:28:35 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Org Directory
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
2024-02-05 13:22:49 +01:00
|
|
|
(setq org-directory +user-org-path)
|
2024-02-02 09:28:35 +01:00
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Org Hooks
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
2024-02-01 15:50:30 +01:00
|
|
|
(add-hook 'org-mode-hook #'org-modern-mode)
|
|
|
|
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
|
2024-02-02 09:28:35 +01:00
|
|
|
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
|
|
|
|
#+end_src
|
2024-02-01 15:50:30 +01:00
|
|
|
|