mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-10 18:11:13 +10:00
Cleaning up the Doom config; also created function for auto_tangle.
This commit is contained in:
+49
-36
@@ -366,7 +366,6 @@
|
|||||||
:desc "Org babel tangle" "m B" #'org-babel-tangle)
|
:desc "Org babel tangle" "m B" #'org-babel-tangle)
|
||||||
(after! org
|
(after! org
|
||||||
(setq org-directory "~/nc/Org/"
|
(setq org-directory "~/nc/Org/"
|
||||||
org-roam-directory "~/nc/Org/roam/"
|
|
||||||
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||||
org-ellipsis " ▼ "
|
org-ellipsis " ▼ "
|
||||||
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
||||||
@@ -393,6 +392,53 @@
|
|||||||
"DONE(d)" ; Task has been completed
|
"DONE(d)" ; Task has been completed
|
||||||
"CANCELLED(c)" )))) ; Task has been cancelled
|
"CANCELLED(c)" )))) ; Task has been cancelled
|
||||||
|
|
||||||
|
(after! org
|
||||||
|
(setq org-agenda-files '("~/nc/Org/agenda.org")))
|
||||||
|
|
||||||
|
(setq
|
||||||
|
;; org-fancy-priorities-list '("[A]" "[B]" "[C]")
|
||||||
|
;; org-fancy-priorities-list '("❗" "[B]" "[C]")
|
||||||
|
org-fancy-priorities-list '("🟥" "🟧" "🟨")
|
||||||
|
org-priority-faces
|
||||||
|
'((?A :foreground "#ff6c6b" :weight bold)
|
||||||
|
(?B :foreground "#98be65" :weight bold)
|
||||||
|
(?C :foreground "#c678dd" :weight bold))
|
||||||
|
org-agenda-block-separator 8411)
|
||||||
|
|
||||||
|
(setq org-agenda-custom-commands
|
||||||
|
'(("v" "A better agenda view"
|
||||||
|
((tags "PRIORITY=\"A\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "High-priority unfinished tasks:")))
|
||||||
|
(tags "PRIORITY=\"B\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Medium-priority unfinished tasks:")))
|
||||||
|
(tags "PRIORITY=\"C\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Low-priority unfinished tasks:")))
|
||||||
|
(tags "customtag"
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Tasks marked with customtag:")))
|
||||||
|
|
||||||
|
(agenda "")
|
||||||
|
(alltodo "")))))
|
||||||
|
|
||||||
|
(use-package! org-auto-tangle
|
||||||
|
:defer t
|
||||||
|
:hook (org-mode . org-auto-tangle-mode)
|
||||||
|
:config
|
||||||
|
(setq org-auto-tangle-default t))
|
||||||
|
|
||||||
|
(defun dt/insert-auto-tangle-tag ()
|
||||||
|
"Insert auto-tangle tag in a literate config."
|
||||||
|
(interactive)
|
||||||
|
(evil-org-open-below 1)
|
||||||
|
(insert "#+auto_tangle: t ")
|
||||||
|
(evil-force-normal-state))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Insert auto_tangle tag" "i a" #'dt/insert-auto-tangle-tag)
|
||||||
|
|
||||||
(defun dt/org-colors-doom-one ()
|
(defun dt/org-colors-doom-one ()
|
||||||
"Enable Doom One colors for Org headers."
|
"Enable Doom One colors for Org headers."
|
||||||
(interactive)
|
(interactive)
|
||||||
@@ -684,41 +730,8 @@
|
|||||||
))
|
))
|
||||||
|
|
||||||
(after! org
|
(after! org
|
||||||
(setq org-agenda-files '("~/nc/Org/agenda.org")))
|
(setq org-roam-directory "~/nc/Org/roam/"
|
||||||
|
org-roam-graph-viewer "/usr/bin/brave"))
|
||||||
(setq
|
|
||||||
;; org-fancy-priorities-list '("[A]" "[B]" "[C]")
|
|
||||||
;; org-fancy-priorities-list '("❗" "[B]" "[C]")
|
|
||||||
org-fancy-priorities-list '("🟥" "🟧" "🟨")
|
|
||||||
org-priority-faces
|
|
||||||
'((?A :foreground "#ff6c6b" :weight bold)
|
|
||||||
(?B :foreground "#98be65" :weight bold)
|
|
||||||
(?C :foreground "#c678dd" :weight bold))
|
|
||||||
org-agenda-block-separator 8411)
|
|
||||||
|
|
||||||
(setq org-agenda-custom-commands
|
|
||||||
'(("v" "A better agenda view"
|
|
||||||
((tags "PRIORITY=\"A\""
|
|
||||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
|
||||||
(org-agenda-overriding-header "High-priority unfinished tasks:")))
|
|
||||||
(tags "PRIORITY=\"B\""
|
|
||||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
|
||||||
(org-agenda-overriding-header "Medium-priority unfinished tasks:")))
|
|
||||||
(tags "PRIORITY=\"C\""
|
|
||||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
|
||||||
(org-agenda-overriding-header "Low-priority unfinished tasks:")))
|
|
||||||
(tags "customtag"
|
|
||||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
|
||||||
(org-agenda-overriding-header "Tasks marked with customtag:")))
|
|
||||||
|
|
||||||
(agenda "")
|
|
||||||
(alltodo "")))))
|
|
||||||
|
|
||||||
(use-package! org-auto-tangle
|
|
||||||
:defer t
|
|
||||||
:hook (org-mode . org-auto-tangle-mode)
|
|
||||||
:config
|
|
||||||
(setq org-auto-tangle-default t))
|
|
||||||
|
|
||||||
(map! :leader
|
(map! :leader
|
||||||
(:prefix ("n r" . "org-roam")
|
(:prefix ("n r" . "org-roam")
|
||||||
|
|||||||
+66
-56
@@ -41,12 +41,12 @@
|
|||||||
- [[#neotree][NEOTREE]]
|
- [[#neotree][NEOTREE]]
|
||||||
- [[#open-specific-files][OPEN SPECIFIC FILES]]
|
- [[#open-specific-files][OPEN SPECIFIC FILES]]
|
||||||
- [[#org-mode][ORG MODE]]
|
- [[#org-mode][ORG MODE]]
|
||||||
|
- [[#org-agenda][Org-agenda]]
|
||||||
|
- [[#org-auto-tangle][Org-auto-tangle]]
|
||||||
- [[#org-fonts][Org fonts]]
|
- [[#org-fonts][Org fonts]]
|
||||||
- [[#org-export][Org-export]]
|
- [[#org-export][Org-export]]
|
||||||
- [[#org-journal][Org-journal]]
|
- [[#org-journal][Org-journal]]
|
||||||
- [[#org-publish][Org-publish]]
|
- [[#org-publish][Org-publish]]
|
||||||
- [[#org-agenda][Org-agenda]]
|
|
||||||
- [[#org-auto-tangle][Org-auto-tangle]]
|
|
||||||
- [[#org-roam][Org-roam]]
|
- [[#org-roam][Org-roam]]
|
||||||
- [[#password-store][PASSWORD STORE]]
|
- [[#password-store][PASSWORD STORE]]
|
||||||
- [[#perspective][PERSPECTIVE]]
|
- [[#perspective][PERSPECTIVE]]
|
||||||
@@ -369,7 +369,6 @@ cd ~/
|
|||||||
ln -s ~/.local/share/Trash .
|
ln -s ~/.local/share/Trash .
|
||||||
#+end_example
|
#+end_example
|
||||||
|
|
||||||
|
|
||||||
* DOOM THEME
|
* DOOM THEME
|
||||||
Setting the theme to doom-one. To try out new themes, I set a keybinding for counsel-load-theme with 'SPC h t'.
|
Setting the theme to doom-one. To try out new themes, I set a keybinding for counsel-load-theme with 'SPC h t'.
|
||||||
|
|
||||||
@@ -403,7 +402,6 @@ The Emacs Desktop Notification Center (EDNC) is an Emacs package written in pure
|
|||||||
(kbd "d") 'ednc-dismiss-notification
|
(kbd "d") 'ednc-dismiss-notification
|
||||||
(kbd "RET") 'ednc-invoke-action
|
(kbd "RET") 'ednc-invoke-action
|
||||||
(kbd "e") 'ednc-toggle-expanded-view)
|
(kbd "e") 'ednc-toggle-expanded-view)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* ELFEED
|
* ELFEED
|
||||||
@@ -499,7 +497,6 @@ ERC is a built-in Emacs IRC client.
|
|||||||
erc-fill-static-center 20
|
erc-fill-static-center 20
|
||||||
;; erc-auto-query 'bury
|
;; erc-auto-query 'bury
|
||||||
)
|
)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* EVALUATE ELISP EXPRESSIONS
|
* EVALUATE ELISP EXPRESSIONS
|
||||||
@@ -591,6 +588,7 @@ Some custom functions to insert the date. The function 'insert-todays-date' can
|
|||||||
:desc "Insert any date" "a" #'dt/insert-any-date
|
:desc "Insert any date" "a" #'dt/insert-any-date
|
||||||
:desc "Insert todays date" "t" #'dt/insert-todays-date))
|
:desc "Insert todays date" "t" #'dt/insert-todays-date))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* IVY
|
* IVY
|
||||||
Ivy is a generic completion mechanism for Emacs.
|
Ivy is a generic completion mechanism for Emacs.
|
||||||
|
|
||||||
@@ -731,6 +729,8 @@ Neotree is a file tree viewer. When you open neotree, it jumps to the current f
|
|||||||
* OPEN SPECIFIC FILES
|
* OPEN SPECIFIC FILES
|
||||||
Keybindings to open files that I work with all the time using the find-file command, which is the interactive file search that opens with 'C-x C-f' in GNU Emacs or 'SPC f f' in Doom Emacs. These keybindings use find-file non-interactively since we specify exactly what file to open. The format I use for these bindings is 'SPC =' plus 'key' since Doom Emacs does not use 'SPC ='.
|
Keybindings to open files that I work with all the time using the find-file command, which is the interactive file search that opens with 'C-x C-f' in GNU Emacs or 'SPC f f' in Doom Emacs. These keybindings use find-file non-interactively since we specify exactly what file to open. The format I use for these bindings is 'SPC =' plus 'key' since Doom Emacs does not use 'SPC ='.
|
||||||
|
|
||||||
|
=NOTE=: Doom Emacs already has a function 'doom/open-private-config' set to the keybinding 'SPC f p'. This allows you to open any file in your HOME/.config/doom directory, so the following keybindings that I created are not really necessary, but I created this section as an example of how to to create bindings that open specific files on your system.
|
||||||
|
|
||||||
| PATH TO FILE | DESCRIPTION | KEYBINDING |
|
| PATH TO FILE | DESCRIPTION | KEYBINDING |
|
||||||
|-------------------------------+-----------------------------+------------|
|
|-------------------------------+-----------------------------+------------|
|
||||||
| ~/.config/doom/start.org | /Edit start.org (start page)/ | SPC = = |
|
| ~/.config/doom/start.org | /Edit start.org (start page)/ | SPC = = |
|
||||||
@@ -765,7 +765,6 @@ I wrapped most of this block in (after! org). Without this, my settings might b
|
|||||||
:desc "Org babel tangle" "m B" #'org-babel-tangle)
|
:desc "Org babel tangle" "m B" #'org-babel-tangle)
|
||||||
(after! org
|
(after! org
|
||||||
(setq org-directory "~/nc/Org/"
|
(setq org-directory "~/nc/Org/"
|
||||||
org-roam-directory "~/nc/Org/roam/"
|
|
||||||
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||||
org-ellipsis " ▼ "
|
org-ellipsis " ▼ "
|
||||||
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
||||||
@@ -793,10 +792,65 @@ I wrapped most of this block in (after! org). Without this, my settings might b
|
|||||||
"CANCELLED(c)" )))) ; Task has been cancelled
|
"CANCELLED(c)" )))) ; Task has been cancelled
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Org-agenda
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(after! org
|
||||||
|
(setq org-agenda-files '("~/nc/Org/agenda.org")))
|
||||||
|
|
||||||
|
(setq
|
||||||
|
;; org-fancy-priorities-list '("[A]" "[B]" "[C]")
|
||||||
|
;; org-fancy-priorities-list '("❗" "[B]" "[C]")
|
||||||
|
org-fancy-priorities-list '("🟥" "🟧" "🟨")
|
||||||
|
org-priority-faces
|
||||||
|
'((?A :foreground "#ff6c6b" :weight bold)
|
||||||
|
(?B :foreground "#98be65" :weight bold)
|
||||||
|
(?C :foreground "#c678dd" :weight bold))
|
||||||
|
org-agenda-block-separator 8411)
|
||||||
|
|
||||||
|
(setq org-agenda-custom-commands
|
||||||
|
'(("v" "A better agenda view"
|
||||||
|
((tags "PRIORITY=\"A\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "High-priority unfinished tasks:")))
|
||||||
|
(tags "PRIORITY=\"B\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Medium-priority unfinished tasks:")))
|
||||||
|
(tags "PRIORITY=\"C\""
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Low-priority unfinished tasks:")))
|
||||||
|
(tags "customtag"
|
||||||
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||||
|
(org-agenda-overriding-header "Tasks marked with customtag:")))
|
||||||
|
|
||||||
|
(agenda "")
|
||||||
|
(alltodo "")))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Org-auto-tangle
|
||||||
|
=org-auto-tangle= allows you to add the option =#+auto_tangle: t= in your Org file so that it automatically tangles when you save the document. I have made adding this to your file even easier by creating a function 'dt/insert-auto-tangle-tag' and setting it to a keybinding 'SPC i a'.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package! org-auto-tangle
|
||||||
|
:defer t
|
||||||
|
:hook (org-mode . org-auto-tangle-mode)
|
||||||
|
:config
|
||||||
|
(setq org-auto-tangle-default t))
|
||||||
|
|
||||||
|
(defun dt/insert-auto-tangle-tag ()
|
||||||
|
"Insert auto-tangle tag in a literate config."
|
||||||
|
(interactive)
|
||||||
|
(evil-org-open-below 1)
|
||||||
|
(insert "#+auto_tangle: t ")
|
||||||
|
(evil-force-normal-state))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Insert auto_tangle tag" "i a" #'dt/insert-auto-tangle-tag)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Org fonts
|
** Org fonts
|
||||||
I have created an interactive function for each color scheme (M-x dt/org-colors-*). These functions will set appropriate colors and font attributes for org-level fonts and the org-table font.
|
I have created an interactive function for each color scheme (M-x dt/org-colors-*). These functions will set appropriate colors and font attributes for org-level fonts and the org-table font.
|
||||||
#+begin_src emacs-lisp
|
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
(defun dt/org-colors-doom-one ()
|
(defun dt/org-colors-doom-one ()
|
||||||
"Enable Doom One colors for Org headers."
|
"Enable Doom One colors for Org headers."
|
||||||
(interactive)
|
(interactive)
|
||||||
@@ -959,7 +1013,6 @@ I have created an interactive function for each color scheme (M-x dt/org-colors-
|
|||||||
|
|
||||||
;; Load our desired dt/org-colors-* theme on startup
|
;; Load our desired dt/org-colors-* theme on startup
|
||||||
(dt/org-colors-doom-one)
|
(dt/org-colors-doom-one)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Org-export
|
** Org-export
|
||||||
@@ -1102,56 +1155,14 @@ We need ox-man for "Org eXporting" to manpage format and ox-gemini for exporting
|
|||||||
))
|
))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Org-agenda
|
** Org-roam
|
||||||
|
[[https://github.com/org-roam/org-roam][Org-roam]] is a plain-text knowledge management system. Org-roam borrows principles from the =Zettelkasten= method, providing a solution for non-hierarchical note-taking. It should also work as a plug-and-play solution for anyone already using Org-mode for their personal wiki.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! org
|
(after! org
|
||||||
(setq org-agenda-files '("~/nc/Org/agenda.org")))
|
(setq org-roam-directory "~/nc/Org/roam/"
|
||||||
|
org-roam-graph-viewer "/usr/bin/brave"))
|
||||||
|
|
||||||
(setq
|
|
||||||
;; org-fancy-priorities-list '("[A]" "[B]" "[C]")
|
|
||||||
;; org-fancy-priorities-list '("❗" "[B]" "[C]")
|
|
||||||
org-fancy-priorities-list '("🟥" "🟧" "🟨")
|
|
||||||
org-priority-faces
|
|
||||||
'((?A :foreground "#ff6c6b" :weight bold)
|
|
||||||
(?B :foreground "#98be65" :weight bold)
|
|
||||||
(?C :foreground "#c678dd" :weight bold))
|
|
||||||
org-agenda-block-separator 8411)
|
|
||||||
|
|
||||||
(setq org-agenda-custom-commands
|
|
||||||
'(("v" "A better agenda view"
|
|
||||||
((tags "PRIORITY=\"A\""
|
|
||||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
|
||||||
(org-agenda-overriding-header "High-priority unfinished tasks:")))
|
|
||||||
(tags "PRIORITY=\"B\""
|
|
||||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
|
||||||
(org-agenda-overriding-header "Medium-priority unfinished tasks:")))
|
|
||||||
(tags "PRIORITY=\"C\""
|
|
||||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
|
||||||
(org-agenda-overriding-header "Low-priority unfinished tasks:")))
|
|
||||||
(tags "customtag"
|
|
||||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
|
||||||
(org-agenda-overriding-header "Tasks marked with customtag:")))
|
|
||||||
|
|
||||||
(agenda "")
|
|
||||||
(alltodo "")))))
|
|
||||||
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Org-auto-tangle
|
|
||||||
=org-auto-tangle= allows you to add the option =#+auto_tangle: t= in your Org file so that it automatically tangles when you save the document.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package! org-auto-tangle
|
|
||||||
:defer t
|
|
||||||
:hook (org-mode . org-auto-tangle-mode)
|
|
||||||
:config
|
|
||||||
(setq org-auto-tangle-default t))
|
|
||||||
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Org-roam
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(map! :leader
|
(map! :leader
|
||||||
(:prefix ("n r" . "org-roam")
|
(:prefix ("n r" . "org-roam")
|
||||||
:desc "Capture node" "c" #'org-roam-capture
|
:desc "Capture node" "c" #'org-roam-capture
|
||||||
@@ -1159,7 +1170,6 @@ We need ox-man for "Org eXporting" to manpage format and ox-gemini for exporting
|
|||||||
:desc "Show graph" "g" #'org-roam-graph
|
:desc "Show graph" "g" #'org-roam-graph
|
||||||
:desc "Insert node" "i" #'org-roam-node-insert
|
:desc "Insert node" "i" #'org-roam-node-insert
|
||||||
:desc "Toggle roam buffer" "r" #'org-roam-buffer-toggle))
|
:desc "Toggle roam buffer" "r" #'org-roam-buffer-toggle))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* PASSWORD STORE
|
* PASSWORD STORE
|
||||||
|
|||||||
Reference in New Issue
Block a user