commit 6ed98d55390ac38214bc8f96839f8c626982a95b
parent 2d2c69790dbfe82f2124ca5bd6ae63c42eb34207
Author: Michael Neuper <michael@michaelneuper.com>
Date: Sat, 27 Sep 2025 09:29:56 +0200
minor refactor
- use `file-name-concat` instead of `concat`
- add :tangle no to certain code blocks
- reformat function docs
Diffstat:
| M | config.org | | | 74 | ++++++++++++++++++++++++-------------------------------------------------- |
1 file changed, 24 insertions(+), 50 deletions(-)
diff --git a/config.org b/config.org
@@ -283,7 +283,7 @@ Set a custom ascii banner for when emacs is used in the terminal, and a splash i
'face 'doom-dashboard-banner)))
(setq +doom-dashboard-ascii-banner-fn #'my-weebery-is-always-greater
- fancy-splash-image (concat doom-private-dir "images/logo.svg"))
+ fancy-splash-image (file-name-concat doom-private-dir "images/logo.svg"))
#+end_src
*** modeline
Make the modeline look a bit nicer.
@@ -357,7 +357,7 @@ We expect the file encoding to be =LF UTF-8= so, only display it in modeline whe
Change the filename showed in the modline in an =org-roam= buffer to be =(<date>) <name>.org=.
Only relevant if you have [[+roam2]].
-#+begin_src emacs-lisp
+#+begin_src emacs-lisp :tangle no
;; TODO show the name of the note instead of the name of the file
;; modified from https://tecosaur.github.io/emacs-config/config.html#modeline-file-name
;; (defadvice! doom-modeline--buffer-file-name-roam-aware-a (orig-fun)
@@ -530,6 +530,7 @@ Define a custom function to quickly find files in favourite directories.
("g" "~/GitHub/" "GitHub")
("t" "~/.Trash/" "Trash")
("o" "~/OneDrive - Stellenbosch University/" "OneDrive")
+ ("u" "/scpx:ubuntu-vm:" "Ubuntu VM")
("n" "/scpx:narga-general:" "NARGA"))
"List of favorite directories in the form (KEY PATH LABEL).")
@@ -615,7 +616,7 @@ Ensure [[https://github.com/alexluigit/dirvish/blob/main/docs/CUSTOMIZING.org#in
(setq blamer-author-formatter " ✎ %s "
blamer-datetime-formatter "[%s]"
blamer-commit-formatter " ● %s"
- blamer-avatar-folder (concat doom-cache-dir "blamer/avatars/")
+ blamer-avatar-folder (file-name-concat doom-cache-dir "blamer/avatars/")
blamer-bindings '(("<mouse-1>" . blamer-callback-show-commit-diff))
blamer-min-offset 10)
@@ -724,15 +725,15 @@ Formats as: propertized \" at <icon> on <branch-name>\""
;; modified from https://www.reddit.com/r/emacs/comments/xboh0y/how_to_put_icons_into_eshell_ls/
(defun lem-eshell-prettify (file)
"Add features to listings in `eshell/ls' output.
- The features are:
- 1. Add decoration like 'ls -F':
- - Mark directories with a `/'
- - Mark executables with a `*'
- 2. Make each listing into a clickable link to open the
- corresponding file or directory.
- 3. Add icons (requires `nerd-icons')
- This function is meant to be used as advice around
- `eshell-ls-annotate', where FILE is the cons describing the file."
+The features are:
+1. Add decoration like 'ls -F':
+ - Mark directories with a `/'
+ - Mark executables with a `*'
+2. Make each listing into a clickable link to open the
+ corresponding file or directory.
+3. Add icons (requires `nerd-icons')
+This function is meant to be used as advice around
+`eshell-ls-annotate', where FILE is the cons describing the file."
(let* ((name (car file))
(icon (if (eq (cadr file) t)
(propertize (nerd-icons-icon-for-dir name) 'face 'eshell-ls-directory)
@@ -1026,43 +1027,16 @@ Set some =org= variables.
;; org-image-actual-width (min (/ (display-pixel-width) 3) 800)
#+end_src
-Customise =org= faces to for links and src blocks and scale headings.
+Scale headings in =org-mode=.
#+begin_src emacs-lisp
(after! org
(custom-set-faces!
- `((org-link)
- :weight normal
- :underline nil)
- ;; `((highlight)
- ;; :underline t
- ;; :foreground nil
- ;; :foreground ,(face-attribute 'highlight :background)
- ;; :background nil)
-
- ;; scale headings
- `((org-document-title)
- :foreground ,(doom-color 'fg)
- :height 1.3 :weight bold)
- `((org-level-1)
- ;; :foreground ,(doom-color 'green)
- :foreground ,(face-attribute 'outline-1 :foreground)
- :height 1.1 :weight medium)
- `((org-level-2)
- ;; :foreground ,(doom-color 'yellow)
- :foreground ,(face-attribute 'outline-2 :foreground)
- :weight medium)
- `((org-level-3)
- ;; :foreground ,(doom-color 'dark-yellow)
- :foreground ,(face-attribute 'outline-3 :foreground)
- :weight medium)
- `((org-level-4)
- ;; :foreground ,(doom-color 'orange)
- :foreground ,(face-attribute 'outline-4 :foreground)
- :weight medium)
- `((org-level-5)
- ;; :foreground ,(doom-color 'red)
- :foreground ,(face-attribute 'outline-5 :foreground)
- :weight medium)))
+ `(org-document-title :foreground ,(doom-color 'fg) :height 1.3 :weight bold)
+ `(org-level-1 :inherit 'outline-1 :weight medium :height 1.1)
+ `(org-level-2 :inherit 'outline-2 :weight medium)
+ `(org-level-3 :inherit 'outline-3 :weight medium)
+ `(org-level-4 :inherit 'outline-4 :weight medium)
+ `(org-level-5 :inherit 'outline-5 :weight medium)))
#+end_src
By default, all =org= links are the same colour, lets change that.
@@ -1089,12 +1063,12 @@ By default, all =org= links are the same colour, lets change that.
(after! org (my/org-apply-link-colors))
#+end_src
-Make it easier to fix my past mistakes.
+I incorrectly tagged a bunch of org files, so this function fixes that.
#+begin_src emacs-lisp
(defun my/org-fix-filetags ()
"Rewrite every `#+filetags:' directive in the current buffer so it uses the
- canonical colon syntax, e.g.
- #+filetags: tag1 tag2 -> #+filetags: :tag1:tag2:"
+canonical colon syntax, e.g.
+ #+filetags: tag1 tag2 -> #+filetags: :tag1:tag2:"
(interactive)
(save-excursion
(goto-char (point-min))
@@ -1256,7 +1230,7 @@ Some eye candy in =org= buffers provided.
#+end_src
***** other
Modern block styling from [[https://github.com/jdtsmith/org-modern-indent][org-modern-indent]].
-#+begin_src emacs-lisp
+#+begin_src emacs-lisp :tangle no
;; (use-package! org-modern-indent
;; :hook (org-mode . org-modern-indent-mode)
;; :config