Reload dashboard when loading theme
To fix dashboard banner background mismatches due to solaire-mode.
This commit is contained in:
parent
5aea22ec31
commit
6e296f3da2
1 changed files with 6 additions and 0 deletions
|
@ -119,6 +119,7 @@ PLIST can have the following properties:
|
|||
(when (equal (buffer-name) "*scratch*")
|
||||
(set-window-buffer nil (doom-fallback-buffer))
|
||||
(+doom-dashboard-reload))
|
||||
(add-hook 'doom-load-theme-hook #'+doom-dashboard-reload-on-theme-change-h)
|
||||
;; Ensure the dashboard is up-to-date whenever it is switched to or resized.
|
||||
(add-hook 'window-configuration-change-hook #'+doom-dashboard-resize-h)
|
||||
(add-hook 'window-size-change-functions #'+doom-dashboard-resize-h)
|
||||
|
@ -333,6 +334,11 @@ What it is set to is controlled by `+doom-dashboard-pwd-policy'."
|
|||
(concat (directory-file-name new-pwd)
|
||||
"/"))))))
|
||||
|
||||
(defun +doom-dashboard-reload-on-theme-change-h ()
|
||||
"Forcibly reload the Doom dashboard when theme changes post-startup."
|
||||
(when after-init-time
|
||||
(+doom-dashboard-reload 'force)))
|
||||
|
||||
(defun +doom-dashboard-reload (&optional force)
|
||||
"Update the DOOM scratch buffer (or create it, if it doesn't exist)."
|
||||
(when (or (and (not +doom-dashboard-inhibit-refresh)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue