doom-modeline: change hook to fix modeline odditites

I was using the wrong hook the entire time and I only realised this now. I saw
this in the hooks documentation and I tried it out only to have it work on the
first turn. Truly incredible.
This commit is contained in:
Artur Manuel 2025-04-16 20:43:16 +01:00
commit a7a31dead0
Signed by: amadaluzia
SSH key fingerprint: SHA256:ubvwT66gNUKSsgSzEb2UQnX8pzTq5N+r8eRVYGJJm4Q

View file

@ -5,16 +5,17 @@
(defun my/doom-modeline-for-new-frames (&optional frame) (defun my/doom-modeline-for-new-frames (&optional frame)
(setq doom-modeline-height (+ (frame-char-height) 8)) (setq doom-modeline-height (+ (frame-char-height) 8))
(with-selected-frame (or frame (selected-frame)) (with-selected-frame (or frame (selected-frame))
(doom-modeline-refresh-bars))) (doom-modeline-mode 1)))
(use-package doom-modeline (use-package doom-modeline
:defer t :defer t
:commands (doom-modeline-mode) :commands (doom-modeline-mode)
:custom :custom
(doom-modeline-mode t) (doom-modeline-mode (not (daemonp)))
(doom-modeline-env-load-string "") (doom-modeline-env-load-string "")
(doom-modeline-height (+ (frame-char-height) 8)) :hook ((server-after-make-frame) . my/doom-modeline-for-new-frames)
:hook (after-make-frame-functions . my/doom-modeline-for-new-frames)) ;; ^^^^^^^^^^^^^^^^^^^^^^^ this hook is my goat
)
(use-package base16-theme (use-package base16-theme
:config :config