Doom Emacs

This literate configuration is available online on my GitHub Pages. Please, if you appreciate my work, consider making a donation.

Table of Contents



Gotta have this at the beginning of the config file.

;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-

Basic Info

Here, I set my name and email address.

(setq user-full-name "Tanner Babcock"
      user-mail-address "")


Fix the garbage collector, enable zoom in and zoom out keybindings.

(setq gc-cons-threshold 134217738
      gc-cons-percentage 0.1
      make-backup-files nil
      auto-save-default nil
      create-lockfiles nil
      vc-follow-symlinks t
      native-comp-async-report-warnings-errors nil
      load-prefer-newer t)
(set-language-environment "UTF-8")
(set-locale-environment "en_US.UTF-8")
(set-selection-coding-system 'utf-8-unix)
(set-charset-priority 'unicode)
(prefer-coding-system 'utf-8-unix)
(set-buffer-file-coding-system 'utf-8-unix)
(set-clipboard-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(global-set-key (kbd "C-<wheel-up>") 'text-scale-increase)
(global-set-key (kbd "C-<wheel-down>") 'text-scale-decrease)
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(delete-selection-mode t)
(setq ranger-show-hidden t)
(setq scroll-conservatively 101
      battery-update-interval 2
      focus-follows-mouse t
      mouse-wheel-scroll-amount '(2 ((shift) . 2))
      mouse-wheel-progressive-speed t
      mouse-wheel-follow-mouse 't
      scroll-step 1
      scroll-margin 2
      scroll-up-aggressively 0.01
      scroll-down-aggressively 0.01
      hscroll-step 1
      hscroll-margin 1
      writeroom-width 100
      writeroom-mode-line t
      writeroom-extra-line-spacing 0.1
      writeroom-maximize-window t
      +zen-text-scale 1)
(setq fancy-battery-show-percentage t)
(setq evil-vsplit-window-right t
      evil-split-window-below t)

(add-hook! 'minibuffer-setup-hook 'garbage-collect)
(add-hook! '+popup-mode-hook (hide-mode-line-mode 1))
(add-hook! '+popup-mode-hook 'garbage-collect)


Now the fun stuff, where I set the fonts, theme, and colors.

; (setq doom-theme 'doom-tomorrow-night)
(setq doom-theme 'doom-molokai)
(setq which-key-idle-delay 0.3
      which-key-idle-secondary-delay 0.05
      +doom-dashboard--width 95
      +doom-dashboard-banner-padding '(0 . 0))
(add-hook! 'doom-switch-buffer-hook 'garbage-collect)

(setq doom-font (font-spec :family "Space Mono Nerd Font" :size 18 :height 1.0)
      doom-big-font (font-spec :family "Space Mono Nerd Font" :size 20 :height 1.0)
      doom-unicode-font (font-spec :family "Space Mono Nerd Font" :size 18 :height 1.0)
      doom-variable-pitch-font (font-spec :family "NotoSerif Nerd Font" :size 18 :height 1.1))
(set-frame-font "Space Mono Nerd Font 18" nil t)

  '(mode-line ((t (:family "Space Mono Nerd Font" :size 18))))
  '(mode-line-active ((t (:family "Space Mono Nerd Font" :size 18))))
  '(mode-line-inactive ((t (:family "Space Mono Nerd Font" :size 18)))))

(setq-default ls-lisp-format-time-list '("%m/%d/%Y %I:%M:%S" "%m/%d/%Y %I:%M:%S"))
(setq ls-lisp-use-localized-time-format t
      display-time-format "%I:%M"
      display-time-default-load-average nil
      display-line-numbers-type 'relative
      confirm-kill-emacs t
      confirm-kill-processes nil
      tab-width 4
      indent-tabs-mode t
      indent-line-function 'insert-tab
      require-final-newline t
      next-line-add-newlines nil
      inhibit-startup-message t
      initial-scratch-message nil
      large-file-warning-threshold nil)
(setq-default shell-file-name "/bin/zsh")

(add-hook! 'helpful-mode-hook 'mixed-pitch-mode)
(add-hook! 'writeroom-mode-enable-hook 'mixed-pitch-mode)
(add-hook! 'writeroom-mode-disable-hook 'mixed-pitch-mode)

These next two lines are where the alpha channel for the window is defined. The Emacs window can only be transparent on

;(set-frame-parameter (selected-frame) 'alpha '(70 70))
(set-frame-parameter (selected-frame) 'alpha 70)
(add-to-list 'default-frame-alist '(alpha 70 70))
(add-hook! 'dired-mode-hook 'all-the-icons-dired-mode)
(add-hook! 'dired-mode-hook 'garbage-collect)

(setq warning-minimum-level :emergency)
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)

Doom Themes

Just a couple more things to make our lives easier.

(after! doom-themes
    (setq doom-themes-enable-bold t
        doom-themes-enable-italic t)

    '(font-lock-comment-face :slant italic)
    '(font-lock-keyword-face :slant italic))

Garbage Collection

Just do it all the time.

(add-hook! 'doom-dashboard-mode-hook 'garbage-collect)
(add-hook! 'doom-dashboard-mode-hook (hide-mode-line-mode 1))
(add-hook! 'doom-load-theme-hook 'garbage-collect)
(add-hook! 'doom-first-file-hook 'garbage-collect)
(add-hook! 'kill-emacs-hook 'garbage-collect)
(add-hook! 'after-init-hook 'garbage-collect)
(add-hook! 'after-init-hook 'beacon-mode)
(add-hook! 'doom-init-ui-hook 'garbage-collect)
(add-hook! 'doom-after-init-modules-hook 'garbage-collect)
(add-hook! 'eww-mode-hook 'garbage-collect)


This is a simple list of font faces for various Circe UI elements.

(after! circe
    '(circe-prompt-face :foreground "#0ef")
    '(circe-server-face :foreground "#ee0")
    '(circe-my-message-face :weight bold :foreground "#f44")
    '(circe-originator-face :foreground "b4f"))
  (add-hook! 'circe-mode-hook 'garbage-collect))


File Associations

(setq dired-open-extensions '(("jpg" . "sxiv")
                              ("png" . "sxiv")
                              ("mkv" . "mpv")
                              ("mp4" . "mpv")))

(require 'notifications)
    :title "Emacs Started"
    :body "Emacs configuration loaded. Welcome!")


(evil-define-key 'normal dired-mode-map
    (kbd "J") 'image-dired-previous-line-and-display
    (kbd "K") 'image-dired-next-line-and-display)

Doom Dashboard

Splash Phrases

I stole this entire next section from someone else.

(defvar splash-phrase-source-folder
    (expand-file-name "phrases/" doom-private-dir)
    "A folder of text files with a fun phrase on each line.")

(defvar splash-phrase-sources
    (let* ((files (directory-files splash-phrase-source-folder nil "\\.txt\\'"))
        (sets (delete-dups (mapcar
            (lambda (file)
            (replace-regexp-in-string "\\(?:-[0-9]+-\\w+\\)?\\.txt" "" file))
            (mapcar (lambda (sset)
            (cons sset
                (delq nil (mapcar
                    (lambda (file)
                        (when (string-match-p (regexp-quote sset) file) file))
    "A list of cons giving the phrase set name, and a list of files which contain phrase components.")

(defvar splash-phrase-set
    (nth (random (length splash-phrase-sources)) (mapcar #'car splash-phrase-sources)))

(defun splase-phrase-set-random-set ()
    "Set a new random splash phrase set."
    (setq splash-phrase-set
        (nth (random (1- (length splash-phrase-sources)))
            (cl-set-difference (mapcar #'car splash-phrase-sources) (list splash-phrase-set))))
    (+doom-dashboard-reload t))

(defvar splase-phrase--cache nil)

(defun splash-phrase-get-from-file (file)
    "Fetch a random line from FILE."
    (let ((lines (or (cdr (assoc file splase-phrase--cache))
        (cdar (push (cons file
                (insert-file-contents (expand-file-name file splash-phrase-source-folder))
                    (split-string (string-trim (buffer-string)) "\n")))
            (nth (random (length lines)) lines)))

(defun splash-phrase (&optional set)
    "Construct a splash phrase from SET. See `splash-phrase-sources'."
    (cdr (assoc (or set splash-phrase-set) splash-phrase-sources)) " "))

(defun doom-dashboard-phrase ()
    "Get a splash phrase, flow it over multiple lines as needed, and make fontify it."
        (lambda (line)
                (insert-text-button line
                 (lambda (_) (+doom-dashboard-reload t))
                 'face 'doom-dashboard-menu-title
                 'mouse-face 'doom-dashboard-menu-title
                 'help-echo "Welcome to DOOM Emacs!"
                 'follow-link t)
                (insert (splash-phrase))
                 (setq fill-column (min 70 (/ (* 2 (window-width)) 3)))
                 (fill-region (point-min) (point-max))

(defadvice! doom-dashboard-widget-loaded-with-phrase ()
    :override #'doom-dashboard-widget-loaded
            (doom-display-benchmark-h 'return))
            'face 'doom-dashboard-footer-icon)


Here is what my Doom splash screen (Dashboard) typically looks like.


My customized dashboard. These first two lines are just for setting up my Multiple Cursors package. Ctrl + Shift + left click and right click can add and remove a cursor, respectively.

(global-set-key (kbd "C-S-<mouse-1>") '+multiple-cursors/evil-mc-toggle-cursor-here)
(global-set-key (kbd "C-S-<mouse-3>") '+multiple-cursors/evil-mc-undo-cursor)

(setq config-org-file-name ""
      config-org-directory "~/.doom.d/"
      agenda-org-file-name ""
      agenda-org-directory "~/org/"
      foot-org-file-name ""
      foot-org-directory "~/.config/foot/")

(defun tb/open-config-org ()
    "Open your private file."
    (find-file (expand-file-name config-org-file-name config-org-directory)))

(defun tb/open-agenda-org ()
    "Open your file."
    (find-file (expand-file-name agenda-org-file-name agenda-org-directory)))

(defun tb/open-foot-org ()
    "Open the Foot configuration file."
    (find-file (expand-file-name foot-org-file-name foot-org-directory)))

(defun tb/open-tbcom ()
    "Opens TBcom repository"
    (dired "~/TBcom"))

(defun tb/open-dotfiles ()
    "Opens Dotfiles repository"
    (dired "~/git/Dotfiles"))

The code above defines functions and variables for making my customized Dashboard menu work. If you, later on, wish to swap out these quick shortcuts for other files or project directories, make sure you change the variable names too, and change the contents of the Dashboard menu sections below.


(setq-default +doom-dashboard-menu-sections
    '(("Kill All Buffers"
        :icon (all-the-icons-octicon "alert" :face 'all-the-icons-red :height 0.95)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lred) :height 0.95)
        :action doom/kill-all-buffers)
      ("Open Recent File"
        :icon (all-the-icons-faicon "clock-o" :face 'all-the-icons-blue :height 0.95)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lblue) :height 0.95)
        :action helm-recentf)
      ("Open Project"
        :icon (all-the-icons-octicon "repo" :face 'all-the-icons-red :height 0.95)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lred) :height 0.95)
        :action projectile-find-file)
      ("Open TBcom"
        :icon (all-the-icons-alltheicon "git" :face 'all-the-icons-pink :height 0.95)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lpink) :height 0.95)
        :action tb/open-tbcom)
      ("Org Agenda"
        :icon (all-the-icons-faicon "calendar" :face 'all-the-icons-maroon :height 0.95)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lmaroon) :height 0.95)
        :action org-agenda)
      ("Open Dotfiles"
        :icon (all-the-icons-faicon "floppy-o" :face 'all-the-icons-blue :height 0.95)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lblue) :height 0.95)
        :action tb/open-dotfiles)
      ("RSS Feeds"
        :icon (all-the-icons-faicon "rss" :face 'all-the-icons-yellow :height 0.95)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lyellow) :height 0.95)
        :action elfeed)
        :icon (all-the-icons-faicon "cogs" :face 'all-the-icons-green :height 0.95)
        :when (file-directory-p doom-private-dir)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lgreen) :height 0.95)
        :action tb/open-config-org)
      ("Doom Reload"
        :icon (all-the-icons-faicon "refresh" :face 'all-the-icons-orange :height 0.95)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lorange) :height 0.95)
        :action doom/reload)
;      ("Change Theme"
;        :icon (all-the-icons-faicon "paint-brush" :face 'all-the-icons-purple :height 0.94)
;        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lpurple) :height 0.95)
;        :action consult-theme)
      ("Music Player"
        :icon (all-the-icons-faicon "music" :face 'all-the-icons-cyan :height 0.95)
        :face (:inherit (doom-dashboard-menu-title bold) :inherit (all-the-icons-lcyan) :height 0.95)
        :action mpdel-playlist-open)))

Each menu item should share a similar color with its respective icon. Using a value for the height other than 0.94 or 0.95 will cause the menu to appear crooked.


This part installs the shortcuts for our Doom Dashboard. These keybindings only work in Dashboard mode. This block of code uses the quick-opener functions I defined above, by the Dashboard menu sections.

Keybinding Action
a Org Agenda
A Open
b Switch Buffer
B Switch Buffer
c Open
C Open Doom Config Directory
d Open ~/.config Directory
D Open Dotfiles Repository
e Open Elfeed
E Open
f Helm Find File
F Open Foot Config
g Open MPDel Artists
h Open Dotfiles Fetch
H Open Dotfiles README
i Open
j Open Dired in Current Directory
J Open Dired in Home Directory
k Kill All Buffers
m Open BSPWM Config
M Open MPV Config
o Open Polybar Config
O Clear MPD Playlist
p Open Project
P Previous Buffer
q Open Qutebrowser Config
r Helm Recent Files
R Doom Reload
s Open Other Dashboard
t Open TBcom
T Select Theme
v Vterm
V Open
w Open Waybar Config
W Open Waybar Style
x Open .Xresources
X Open .xinitrc
z Open ZSH Config
Z Open ZSH Theme
? Doom Help
+ Increase Font Size
- Decrease Font Size
; Open MPDel Playlist
/ Open MPDel Browser
. Open Circe IRC
, Toggle Play/Pause
] Play Next Song
[ Play Previous Song
(setq +doom-dashboard-mode-map (make-sparse-keymap))
(map! :map +doom-dashboard-mode-map
    :desc "Forward" :ne "<down>" #'+doom-dashboard/forward-button
    :desc "Backward" :ne "<up>" #'+doom-dashboard/backward-button
    :desc "Find File" :ne "f" #'helm-find-files
    :desc "Recent Files" :ne "r" #'helm-recentf
    :desc "Doom Reload" :ne "R" #'doom/reload
    :desc "Open Project" :ne "p" #'projectile-find-file
    :desc "Config Dir" :ne "C" #'doom/open-private-config
    :desc "Open Dired" :ne "j" (cmd! (dired "."))
    :desc "Open Dired in Home Directory" :ne "J" (cmd! (dired "~/"))
    :desc "Open" :ne "c" #'tb/open-config-org
    :desc "Open" :ne "i" (cmd! (find-file (expand-file-name "" doom-private-dir)))
    :desc "Open ZSH Config" :ne "z" (cmd! (find-file "~/"))
    :desc "Open Qutebrowser Config" :ne "q" (cmd! (find-file "~/.config/qutebrowser/"))
    :desc "Open Polybar Config" :ne "o" (cmd! (find-file "~/.config/polybar/"))
    :desc "Open Foot Config" :ne "F" #'tb/open-foot-org
    :desc "Open Waybar Config" :ne "w" (cmd! (find-file "~/.config/waybar/"))
    :desc "Open Waybar Style" :ne "W" (cmd! (find-file "~/.config/waybar/"))
    :desc "Open BSPWM Config" :ne "m" (cmd! (find-file "~/.config/bspwm/"))
    :desc "Open MPV Config" :ne "M" (cmd! (find-file "~/.config/mpv/mpv.conf"))
    :desc "Open TBcom" :ne "t" #'tb/open-tbcom
    :desc "Open Dotfiles" :ne "D" #'tb/open-dotfiles
    :desc "Open Dotfiles Fetch" :ne "h" (cmd! (find-file "~/git/Dotfiles/"))
    :desc "Open Dotfiles README" :ne "H" (cmd! (find-file "~/git/Dotfiles/"))
    :desc "Open Xresources" :ne "X" (cmd! (find-file "~/.Xresources"))
    :desc "Open .xinitrc" :ne "x" (cmd! (find-file "~/.xinitrc"))
    :desc "Increase Font Size" :ne "+" #'doom/increase-font-size
    :desc "Decrease Font Size" :ne "-" #'doom/decrease-font-size
    :desc "Open MPDel Playlist" :ne ";" #'mpdel-playlist-open
    :desc "Open MPDel Browser" :ne "/" #'mpdel-browser-open
    :desc "Toggle Play/Pause" :ne "," #'libmpdel-playback-play-pause
    :desc "Open MPDel Artists" :ne "g" #'mpdel-core-open-artists
    :desc "Play Next Song" :ne "]" #'libmpdel-playback-next
    :desc "Play Previous Song" :ne "[" #'libmpdel-playback-previous
    :desc "Clear Current Playlist" :ne "O" #'mpdel-core-replace-current-playlist
    :desc "Doom Help" :ne "?" #'doom/help
    :desc "Open Circe" :ne "." #'circe
    :desc "Agenda" :ne "a" #'org-agenda
    :desc "Open" :ne "A" #'open-agenda-org
    :desc "Open" :ne "V" (cmd! (find-file "~/org/"))
    :desc "Kill All Buffers" :ne "k" #'doom/kill-all-buffers
    :desc "Switch Buffers" :ne "b" #'helm-buffers-list
    :desc "Previous Buffer" :ne "P" #'previous-buffer
    :desc "Open Elfeed" :ne "e" #'elfeed
    :desc "Open" :ne "E" (cmd! (find-file "~/org/"))
    :desc "Reset Elfeed" :ne "n" #'elfeed-db-unload
    :desc "Set Theme" :ne "T" #'consult-theme
    :desc "Open" :ne "v" (cmd! (find-file "~/org/"))
    :desc "Quit" :ne "Q" #'save-buffers-kill-terminal)

This part removes other elements of the Dashboard.

;(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-loaded)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer)


This first block of code defines font faces per Elfeed tags, font faces for UI elements, preferences, and hooks.


(require 'elfeed-goodies)
(after! elfeed
    (defun elfeed-search-format-date (date) (format-time-string "%m/%d/%Y %I:%M:%S" (seconds-to-time date)))
    (setq elfeed-search-filter "@2-weeks-ago +unread"
          elfeed-show-entry-switch #'pop-to-buffer
          elfeed-use-curl t
          elfeed-curl-max-connections 28
          elfeed-curl-timeout 10)
    (defface git-entry
        '((t :foreground "#e93479"))
        "Entry for Git")
    (defface reddit-entry
        '((t :foreground "#d48eb6"))
        "Entry for Reddit")
    (defface youtube-entry
        '((t :foreground "#9d8af7"))
        "Entry for YouTube")
    (defface torrents-entry
        '((t :foreground "#eecece"))
        "Entry for torrents")
    (defface stack-entry
        '((t :foreground "#81db54"))
        "Entry for Stack")
    (defface news-entry
        '((t :foreground "#4869ee"))
        "Entry for News")
    (defface tumblr-entry
        '((t :foreground "#a9668c"))
        "Entry for Tumblr")
    (defface tech-entry
        '((t :foreground "#f90"))
        "Entry for Tech")

Now we push all of these font faces to the elfeed-search faces list.

(push '(git git-entry) elfeed-search-face-alist)
(push '(reddit reddit-entry) elfeed-search-face-alist)
(push '(youtube youtube-entry) elfeed-search-face-alist)
(push '(torrents torrents-entry) elfeed-search-face-alist)
(push '(stack stack-entry) elfeed-search-face-alist)
(push '(news news-entry) elfeed-search-face-alist)
(push '(tumblr tumblr-entry) elfeed-search-face-alist)
(push '(tech tech-entry) elfeed-search-face-alist)

Define additional font faces and hooks.

        '(elfeed-search-feed-face :foreground "#70ca44")
        '(elfeed-search-tag-face :foreground "#e9b64b")
        '(elfeed-search-title-face :inherit variable-pitch :slant italic)
        '(elfeed-search-date-face :foreground "#ffdfdf")
        '(elfeed-search-last-update-face :foreground "#8c79e0"))
    (add-hook! 'elfeed-search-update-hook (hide-mode-line-mode 1))
    (add-hook! 'elfeed-search-mode-hook (hide-mode-line-mode 1))
    (add-hook! 'elfeed-show-mode-hook (hide-mode-line-mode 1) (hl-line-mode -1))
    (add-hook! 'elfeed-search-mode-hook #'elfeed-update)
;    (add-hook! 'elfeed-search-mode-hook 'garbage-collect)
    (add-hook! 'elfeed-show-mode-hook #'elfeed-update)
    (add-hook! 'elfeed-show-mode-hook 'visual-line-mode)
;    (add-hook! 'elfeed-show-mode-hook 'garbage-collect)
;    (add-hook! 'elfeed-update-init-hook 'garbage-collect)
    (add-hook! 'elfeed-db-unload-hook 'garbage-collect))

This second block of code sets preferences for the elfeed-goodies package.

(after! elfeed-goodies
    (setq elfeed-goodies/entry-pane-size 0.5
          elfeed-goodies/powerline-default-separator 'wave
          elfeed-goodies/show-mode-padding 1
          elfeed-goodies/feed-source-column-width 20
          elfeed-goodies/tag-column-width 20))


I have custom key bindings for Elfeed that will filter the feed list by tag names. Shift + J and Shift + K (or capital J and K) will update the entry pane with the next item in the elfeed-search.

Key Elfeed Search Filter
q +tumblr
e +reddit
p +stack
m +media
o +news
i +git
x +youtube
n +torrents
v +tech
(after! elfeed-goodies
    (evil-define-key 'normal elfeed-show-mode-map
        (kbd "J") 'elfeed-goodies/split-show-next
        (kbd "K") 'elfeed-goodies/split-show-prev)
    (evil-define-key 'normal elfeed-search-mode-map
        (kbd "J") 'elfeed-goodies/split-show-next
        (kbd "K") 'elfeed-goodies/split-show-prev
        (kbd "q") (lambda () (elfeed-search-set-filter "@2-weeks-ago +tumblr +unread"))
        (kbd "e") (lambda () (elfeed-search-set-filter "@2-weeks-ago +reddit +unread"))
        (kbd "p") (lambda () (elfeed-search-set-filter "@2-weeks-ago +stack +unread"))
        (kbd "m") (lambda () (elfeed-search-set-filter "@2-weeks-ago +media +unread"))
        (kbd "o") (lambda () (elfeed-search-set-filter "@2-weeks-ago +news +unread"))
        (kbd "i") (lambda () (elfeed-search-set-filter "@2-weeks-ago +git +unread"))
        (kbd "x") (lambda () (elfeed-search-set-filter "@2-weeks-ago +youtube +unread"))
        (kbd "n") (lambda () (elfeed-search-set-filter "@2-weeks-ago +torrents +unread"))
        (kbd "v") (lambda () (elfeed-search-set-filter "@2-weeks-ago +tech +unread"))
        (kbd "g") (lambda () (elfeed-search-browse-url)))
    (map! :map +elfeed-search-mode-map
        :desc "Show selected entry" :ne "RET" #'elfeed-search-show-entry
        :desc "Kill buffer" :ne "q" #'elfeed-kill-buffer
        :desc "Set filter" :ne "S" #'elfeed-search-set-filter
        :desc "Clear filter" :ne "c" #'elfeed-search-clear-filter)
    (map! :map +elfeed-show-mode-map
        :desc "Show selected entry" :ne "RET" #'elfeed-search-show-entry
        :desc "Set filter" :ne "S" #'elfeed-search-set-filter
        :desc "Clear filter" :ne "c" #'elfeed-search-clear-filter))


(after! helm
    (setq helm-show-completion-min-window-height 9))


This first bit lets us navigate between windows easier.

    :m "C-h" #'evil-window-left
    :m "C-j" #'evil-window-down
    :m "C-k" #'evil-window-up
    :m "C-l" #'evil-window-right
    :m "C-w" #'evil-window-vsplit
    :m "C-o" #'evil-window-split

Global Keybindings

These are global keybindings, which are available in all modes. The Magit key bindings will not work if the file is not in a Git repository.

Keybinding Action
SPC DEL Clear MPDel Playlist
SPC a Toggle Zen Mode
SPC b Beacon Mode
SPC c Highlight Scope Mode
SPC d Org Todo
SPC e Magit Log
SPC i Toggle Fullscreen Zen
SPC j Magit Pull
SPC k Magit Push Remote
SPC l Org Tangle
SPC m MPDel Playlist
SPC n MPDel Browser
SPC p Org Export to HTML
SPC r Rainbow Mode
SPC t Magit Stage File
SPC u Delete Buffer
SPC v Vterm
SPC x Mixed Pitch Mode
SPC y Magit Status
SPC z Play Song in MPDel
SPC / Add Song to MPDel Playlist
SPC - Org Agenda
SPC = Org Time Stamp
SPC ] Next Song
SPC [ Previous Song
(map! :leader
    :desc "Toggle Zen" "a" #'+zen/toggle
    :desc "Beacon Mode" "b" #'beacon-mode
    :desc "Rainbow Mode" "r" #'rainbow-mode
    :desc "Play song in MPDel" "z" #'mpdnotify-play
    :desc "Toggle Fullscreen Zen" "i" #'+zen/toggle-fullscreen
    :desc "Org Tangle" "l" #'org-babel-tangle
    :desc "MPDel Playlist" "m" #'mpdel-playlist-open
    :desc "Add Song to MPDel Playlist" "/" #'mpdel-core-add-to-current-playlist
    :desc "MPDel Next Song" "]" #'libmpdel-playback-next
    :desc "MPDel Previous Song" "[" #'libmpdel-playback-previous
    :desc "Vterm" "v" #'+vterm/toggle
    :desc "Org Mark Done" "d" #'org-todo
    :desc "Mixed Pitch Mode" "x" #'mixed-pitch-mode
    :desc "Magit Status" "y" #'magit-status
    :desc "Delete Buffer" "u" #'evil-delete-buffer
    :desc "Org Export to HTML" "p" #'org-html-export-to-html
    :desc "Multiple Cursors Toggle" "c" #'+multiple-cursors/evil-mc-toggle-cursors
    :desc "Magit Log" "e" #'magit-log-all
    :desc "Magit Stage File" "t" #'magit-stage-file
    :desc "Magit Push Remote" "k" #'magit-push-current-to-pushremote
    :desc "Magit Pull" "j" #'magit-pull-from-pushremote
    :desc "Switch Buffer" "," #'helm-buffers-list
    :desc "Org Agenda" "-" #'org-agenda
    :desc "Org Time Stamp" "=" #'org-time-stamp
    :desc "Org Priority Up" "\\" #'org-priority-up
    :desc "Org Priority Down" "'" #'org-priority-down)


(after! magit
        '(magit-log-author :foreground "#e93479")
        '(magit-log-date :foreground "#f9c65b")
        '(magit-hash :foreground "#81db54")
        '(magit-filename :foreground "#9d8af7")
        '(magit-branch-current :foreground "#5879fe"))
    (add-hook! 'magit-status-mode-hook (hide-mode-line-mode 1))
    (add-hook! 'magit-log-mode-hook (hide-mode-line-mode 1))
    (add-hook! 'magit-mode-hook 'garbage-collect)
    (add-hook! 'magit-log-mode-hook 'garbage-collect)
    (add-hook! 'magit-status-mode-hook 'garbage-collect)
    (add-hook! 'magit-popup-mode-hook 'garbage-collect))

(after! diff-hl

(add-hook! 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh)
(add-hook! 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)


(after! modeline
    (setq doom-modeline-buffer-file-name-style 'relative-to-project
          doom-modeline-icon (display-graphic-p)
          doom-modeline-major-mode-icon t
          doom-modeline-major-mode-color-icon t
          doom-modeline-env-version t
          doom-modeline-persp-icon t
          doom-modeline-unicode-fallback nil
          doom-modeline-buffer-state-icon nil
          doom-modeline-height 30
          doom-modeline-hud t
          doom-modeline-buffer-modification-icon nil)
    (add-hook! 'doom-modeline-mode-hook 'garbage-collect))
(setq-default doom-modeline-major-mode-icon t
              doom-modeline-major-mode-color-icon t
              doom-modeline-buffer-file-name-style 'relative-to-project
              doom-modeline-env-version t
              doom-modeline-persp-icon t
              doom-modeline-buffer-state-icon nil
              doom-modeline-unicode-fallback nil
              doom-modeline-hud t
              doom-modeline-height 30
              doom-modeline-buffer-modification-icon nil)



These two functions are useful for showing MPD notifications with album artwork and artist and album fields. I will add these functions to MPDel’s hooks.

(defun mpdnotify ()
    (shell-command "/home/babkock/.ncmpcpp/ncmpcpp-ueberzug/")
        :title (shell-command-to-string "mpc --host -f %title% | head -1")
        :body (concat (shell-command-to-string "mpc --host -f %artist% | head -1") "<i>" (shell-command-to-string "mpc --host -f %album% | head -1") "</i>")
        :image-path "/tmp/mpd_cover.jpg"

(defun mpdnotify-play ()


This is a list of faces for the MPDel interface. After this list is where I add the mpdnotify function to the hooks.

    '(mpdel-tablist-song-name-face :inherit variable-pitch :weight bold :foreground "#9d8af7")
    '(mpdel-tablist-artist-face :inherit variable-pitch :weight bold :foreground "#e93478")
    '(mpdel-tablist-album-face :inherit variable-pitch :weight bold :slant italic :foreground "#81db54")
    '(mpdel-tablist-track-face :inherit variable-pitch :weight bold :foreground "#5879fe")
    '(mpdel-playlist-current-song-face :inherit variable-pitch :weight bold :slant italic :foreground "#efefef" :background "#000")
    '(mpdel-tablist-disc-face :foreground "#d48eb6")
    '(mpdel-tablist-date-face :foreground "#f9c65b")
    '(header-line :height 1.1))

(add-hook! 'mpdel-playlist-mode-hook 'garbage-collect)
(add-hook! 'mpdel-playlist-mode-hook (hide-mode-line-mode 1))
(add-hook! 'mpdel-playlist-mode-hook '(hl-line-mode))
(add-hook! 'mpdel-playlist-mode-hook 'mpdnotify)
(add-hook! 'libmpdel-current-song-changed-hook 'mpdnotify)
(add-hook! 'mpdel-tablist-mode-hook 'garbage-collect)
(add-hook! 'mpdel-browser-mode-hook '(hl-line-mode))
(add-hook! 'navigel-tablist-mode-hook '(hl-line-mode))
(add-hook! 'mpdel-tablist-mode-hook (hide-mode-line-mode 1))
(add-hook! 'navigel-tablist-mode-hook (hide-mode-line-mode 1))
(after! mpdel
    (setq libmpdel-hostname "")
    (require 'mpdel)


(setq mpdel-playlist-mode-map (make-sparse-keymap))
(map! :map mpdel-playlist-mode-map
    :desc "Play/Pause" :ne "p" #'libmpdel-playback-play-pause
    :desc "Browser" :ne "b" #'mpdel-browser-open
    :desc "Play" :ne "RET" #'mpdnotify-play
    :desc "Increase Volume" :ne "<right>" #'mpdel-core-volume-increase
    :desc "Decrease Volume" :ne "<left>" #'mpdel-core-volume-decrease
    :desc "Clear Playlist" :ne "c" #'mpdel-core-replace-current-playlist
    :desc "Dired" :ne "e" #'mpdel-core-dired
    :desc "Set Random" :ne "z" #'libmpdel-playback-set-random
    :desc "Unset Random" :ne "Z" #'libmpdel-playback-unset-random
    :desc "Set Single" :ne "y" #'libmpdel-playback-set-single-once
    :desc "Unset Single" :ne "Y" #'libmpdel-playback-set-single-never
    :desc "Next Song" :ne ">" #'libmpdel-playback-next
    :desc "Previous Song" :ne "<" #'libmpdel-playback-previous)


(after! org
    (add-hook! 'org-mode-hook 'garbage-collect)
    (add-hook! 'org-mode-hook #'org-modern-mode)
    (add-hook! 'org-agenda-finalize-hook #'org-modern-agenda)
    (add-hook! 'org-mode-hook 'org-fancy-priorities-mode)
    (setq org-directory "~/org/"
          org-agenda-files '("~/org/" "~/org/" "~/org/")
          org-agenda-block-separator 8411
          org-tags-column 0
          org-pretty-entities t
          org-default-notes-file (expand-file-name "" org-directory)
          org-superstar-headline-bullets-list '("◉" "● " "○ " "◆" "●" "○" "◆")
          org-superstar-item-bullet-alist '((?+ . ?➤) (?- . ?✦))
          org-ellipsis "  "
          org-catch-invisible-edits 'smart
          org-log-done 'time
          org-journal-dir "~/org/journal/"
          org-hide-emphasis-markers t
          org-support-shift-select t
          org-src-preserve-indentation nil
          org-src-tab-acts-natively t
          org-edit-src-content-indentation 0)
    (setq org-todo-keywords
          '((sequence "TODO(t)" "NEXT(n)" "VIDEO(v)" "IDEA(i)" "DONE(d)" "EVENT(e)"))
          '(("TODO" . 'all-the-icons-red)
            ("NEXT" . 'all-the-icons-blue)
            ("VIDEO" . 'all-the-icons-yellow)
            ("IDEA" . 'all-the-icons-green)
            ("DONE" . 'all-the-icons-orange)
            ("EVENT" . 'all-the-icons-cyan)))
        '(org-agenda-calendar-event :inherit variable-pitch)
        '(org-agenda-calendar-sexp :inherit variable-pitch)
        '(org-agenda-filter-category :inherit variable-pitch)
        '(org-agenda-filter-tags :inherit variable-pitch)
        '(org-agenda-date :inherit variable-pitch :weight bold :height 1.09)
        '(org-agenda-date-weekend :inherit variable-pitch :weight bold :height 1.06)
        '(org-agenda-done :inherit variable-pitch :weight bold)
        '(org-agenda-date-today :inherit variable-pitch :weight bold :slant italic :height 1.12)
        '(org-agenda-date-weekend-today :inherit variable-pitch :weight bold :height 1.09)
        '(org-agenda-dimmed-todo-face :inherit variable-pitch :weight bold)
        '(org-agenda-current-time :inherit variable-pitch :weight bold)
        '(org-agenda-clocking :inherit variable-pitch :weight bold))
    (add-hook! 'org-agenda-mode-hook 'mixed-pitch-mode)
    (add-hook! 'org-agenda-mode-hook (hide-mode-line-mode 1))
        '(org-document-title :height 1.3)
        '(org-level-1 :inherit outline-1 :weight extra-bold :height 1.35)
        '(org-level-2 :inherit outline-2 :weight bold :height 1.15)
        '(org-level-3 :inherit outline-3 :weight bold :height 1.12)
        '(org-level-4 :inherit outline-4 :weight bold :height 1.09)
        '(org-level-5 :inherit outline-5 :weight bold :height 1.06)
        '(org-level-6 :inherit outline-6 :weight semi-bold :height 1.03)
        '(org-level-7 :inherit outline-7 :weight semi-bold)
        '(org-level-8 :inherit outline-8 :weight semi-bold)))

(after! org-fancy-priorities
    (setq org-fancy-priorities-list '("#A" "#B" "#C")
              '((?A :foreground "#e93479" :weight bold)
                (?B :foreground "#ffffff" :weight bold)
                (?C :foreground "#5879fe" :weight bold))))

(font-lock-add-keywords 'org-mode
    '(("^ *\\([-]\\) "
        (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))


(after! treemacs
    (setq doom-themes-treemacs-theme "doom-colors")
    (setq doom-themes-treemacs-enable-variable-pitch t))

Author: Tanner Babcock

Created: 2023-03-29 Wed 17:58