2024-02-10 18:17:29 +01:00
|
|
|
#+TITLE: Emacs Config
|
|
|
|
#+AUTHOR: Jonathan Jenne / Inhji
|
2024-02-14 05:44:20 +01:00
|
|
|
#+PROPERTY: header-args :tangle config.el
|
2024-02-10 18:17:29 +01:00
|
|
|
#+auto_tangle: t
|
|
|
|
|
2024-02-15 07:20:45 +01:00
|
|
|
* Table of Contents :toc:
|
|
|
|
- [[#keybindings][Keybindings]]
|
|
|
|
- [[#base-config][Base Config]]
|
|
|
|
- [[#themes][Themes]]
|
|
|
|
- [[#org-mode][Org Mode]]
|
|
|
|
- [[#hooks][Hooks]]
|
|
|
|
- [[#general-settings][General Settings]]
|
|
|
|
- [[#org-capture][Org Capture]]
|
|
|
|
- [[#org-agenda][Org Agenda]]
|
|
|
|
- [[#packages][Packages]]
|
|
|
|
- [[#hl-todo][hl-todo]]
|
|
|
|
- [[#org-auto-tangle][org-auto-tangle]]
|
|
|
|
|
|
|
|
* Keybindings
|
|
|
|
|
|
|
|
| Key | Description | State |
|
|
|
|
|------------+-------------------------+-------|
|
|
|
|
| F12 | Show Org-Agenda | N |
|
|
|
|
| Ctrl-Alt-+ | Increase Font Size | |
|
|
|
|
| Ctrl-# | Toggle Line Comment | |
|
|
|
|
| F6 | Toggle Light/Dark Theme | |
|
|
|
|
| Ctrl-c F6 | Load Default Theme | |
|
|
|
|
| DEL | Up Directory | Dired |
|
|
|
|
|
|
|
|
* Base Config
|
|
|
|
|
2024-02-10 18:17:29 +01:00
|
|
|
#+begin_src emacs-lisp
|
|
|
|
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;; Basic User Settings
|
|
|
|
(setq user-full-name "Jonathan Jenne"
|
|
|
|
user-mail-address "johnnie@posteo.de")
|
|
|
|
|
|
|
|
;; Default Shell
|
|
|
|
;; Useful if default system shell is not bash
|
|
|
|
(setq shell-file-name (executable-find "bash"))
|
|
|
|
|
|
|
|
;; Display Line numbers
|
|
|
|
(setq display-line-numbers-type t)
|
|
|
|
|
2024-02-15 07:20:45 +01:00
|
|
|
;; General Keybindings
|
|
|
|
(map! :n "<f12>" #'org-agenda-list)
|
|
|
|
(map! "C-M-+" #'doom/increase-font-size)
|
|
|
|
(map! "C-#" #'comment-line)
|
|
|
|
(evil-define-key 'normal dired-mode-map
|
|
|
|
(kbd "DEL") 'dired-up-directory)
|
|
|
|
#+end_src
|
2024-02-10 18:17:29 +01:00
|
|
|
|
2024-02-15 07:20:45 +01:00
|
|
|
* Themes
|
2024-02-14 05:44:20 +01:00
|
|
|
|
2024-02-15 07:20:45 +01:00
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package! heaven-and-hell
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(setq heaven-and-hell-theme-type 'dark) ;; Omit to use light by default
|
|
|
|
(setq heaven-and-hell-themes
|
|
|
|
'((light . doom-feather-light)
|
|
|
|
(dark . doom-feather-dark))) ;; Themes can be the list: (dark . (tsdh-dark wombat))
|
|
|
|
;; Optionall, load themes without asking for confirmation.
|
|
|
|
(setq heaven-and-hell-load-theme-no-confirm t)
|
|
|
|
:hook (after-init . heaven-and-hell-init-hook)
|
|
|
|
:bind (("C-c <f6>" . heaven-and-hell-load-default-theme)
|
|
|
|
("<f6>" . heaven-and-hell-toggle-theme)))
|
|
|
|
#+end_src
|
2024-02-14 05:44:20 +01:00
|
|
|
|
2024-02-15 07:20:45 +01:00
|
|
|
* Org Mode
|
|
|
|
** Hooks
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
;; Org Mode
|
|
|
|
(add-hook 'org-mode-hook #'org-modern-mode)
|
|
|
|
(add-hook 'org-mode-hook #'hl-todo-mode)
|
|
|
|
|
|
|
|
;; Org Agenda
|
|
|
|
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
|
|
|
|
#+end_src
|
|
|
|
** General Settings
|
|
|
|
#+begin_src emacs-lisp
|
2024-02-14 05:44:20 +01:00
|
|
|
(setq +user-org-path "~/Notes/Org")
|
|
|
|
(defun org-path (filename) (expand-file-name filename +user-org-path))
|
2024-02-10 18:17:29 +01:00
|
|
|
|
|
|
|
(after! org (setq org-directory +user-org-path
|
|
|
|
org-src-tab-acts-natively t))
|
|
|
|
|
2024-02-15 07:20:45 +01:00
|
|
|
(add-to-list 'org-modules 'org-habit)
|
|
|
|
#+end_src
|
|
|
|
** Org Capture
|
|
|
|
#+begin_src emacs-lisp
|
2024-02-10 18:17:29 +01:00
|
|
|
(after! org (setq +org-capture-notes-file (org-path "Notes.org")
|
|
|
|
+org-capture-todo-file (org-path "Todo.org")
|
|
|
|
+org-capture-journal-file (org-path "Journal.org")
|
|
|
|
+org-capture-travel-journal-file (org-path "Travel.org")))
|
|
|
|
|
|
|
|
(after! org (setq org-capture-templates
|
2024-02-14 05:44:20 +01:00
|
|
|
'(("t" "Personal todo" entry
|
|
|
|
(file+headline +org-capture-todo-file "Inbox")
|
|
|
|
"* TODO %?\n" :prepend t)
|
2024-02-10 18:17:29 +01:00
|
|
|
|
2024-02-14 05:44:20 +01:00
|
|
|
("n" "Personal notes" entry
|
|
|
|
(file+headline +org-capture-notes-file "Inbox")
|
|
|
|
"* %u %?\n" :prepend t)
|
2024-02-10 18:17:29 +01:00
|
|
|
|
2024-02-14 05:44:20 +01:00
|
|
|
("j" "Journal entries")
|
2024-02-10 18:17:29 +01:00
|
|
|
|
2024-02-14 05:44:20 +01:00
|
|
|
("jt" "Travelling Journal" entry
|
|
|
|
(file+headline +org-capture-travel-journal-file "Inbox")
|
|
|
|
"* %u %?\n" :prepend t)
|
2024-02-10 18:17:29 +01:00
|
|
|
|
2024-02-14 05:44:20 +01:00
|
|
|
("jj" "Journal" entry
|
|
|
|
(file+olp+datetree +org-capture-journal-file)
|
|
|
|
"* %U %?\n" :prepend t))))
|
2024-02-15 07:20:45 +01:00
|
|
|
#+end_src
|
|
|
|
** Org Agenda
|
|
|
|
#+begin_src emacs-lisp
|
2024-02-10 18:17:29 +01:00
|
|
|
(after! org (setq
|
2024-02-14 06:10:47 +01:00
|
|
|
org-agenda-show-all-dates nil
|
|
|
|
org-agenda-span 4
|
|
|
|
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
|
|
|
|
org-agenda-files (list +user-org-path)))
|
2024-02-15 07:20:45 +01:00
|
|
|
#+end_src
|
|
|
|
* Packages
|
|
|
|
** hl-todo
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(after! hl-todo (setq hl-todo-keyword-faces '(("TODO" warning bold)
|
|
|
|
("FIXME" error bold)
|
|
|
|
("EXAMPLE" font-lock-keyword-face bold)
|
|
|
|
("HACK" font-lock-constant-face bold)
|
|
|
|
("DEPRECATED" font-lock-doc-face bold)
|
|
|
|
("NOTE" success bold)
|
|
|
|
("BUG" error bold)
|
|
|
|
("XXX" font-lock-constant-face bold))))
|
|
|
|
#+end_src
|
|
|
|
** org-auto-tangle
|
|
|
|
#+begin_src emacs-lisp
|
2024-02-10 18:17:29 +01:00
|
|
|
(use-package! org-auto-tangle
|
|
|
|
:defer t
|
2024-02-15 07:20:45 +01:00
|
|
|
:config (setq org-auto-tangle-default nil)
|
2024-02-10 18:17:29 +01:00
|
|
|
:hook (org-mode . org-auto-tangle-mode))
|
|
|
|
#+end_src
|