aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-25 13:15:21 -0500
committerCraig Jennings <c@cjennings.net>2026-05-25 13:15:21 -0500
commit4586325327b4b1ad5885c91437a774e45332657a (patch)
treebb99d6e800137af95e4f890a0e91ee2f3b18a06e /modules
parent3bd514d9841429ba8a5b02819e7e10950c62ab8e (diff)
downloaddotemacs-4586325327b4b1ad5885c91437a774e45332657a.tar.gz
dotemacs-4586325327b4b1ad5885c91437a774e45332657a.zip
feat(dashboard): render the butterfly banner with a transparency mask
The dashboard banner showed the butterfly PNG without its transparency, because the image descriptor was built before the mask props were set. I moved the banner setup (dashboard-startup-banner, dashboard-banner-logo-title) ahead of dashboard-setup-startup-hook and added dashboard-image-extra-props with :mask heuristic, so the mask is in place when the startup hook builds the buffer. If a *dashboard* buffer already exists I refresh it, so the change shows without a restart. I also re-encoded the PNG smaller and kept the previous encoding as M-x_butterfly.png.bak.
Diffstat (limited to 'modules')
-rw-r--r--modules/dashboard-config.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/dashboard-config.el b/modules/dashboard-config.el
index 4602cc15..ac511b5b 100644
--- a/modules/dashboard-config.el
+++ b/modules/dashboard-config.el
@@ -170,6 +170,14 @@ window."
dashboard-insert-items))
:config
+ ;; == banner
+ ;; Set image props before `dashboard-setup-startup-hook' can build the
+ ;; dashboard buffer; otherwise the startup image descriptor may miss the
+ ;; transparency mask.
+ (setq dashboard-startup-banner (concat user-emacs-directory "assets/M-x_butterfly.png"))
+ (setq dashboard-image-extra-props '(:mask heuristic))
+ (setq dashboard-banner-logo-title "Emacs: The Editor That Saves Your Soul")
+
;; == general
(dashboard-setup-startup-hook) ;; run dashboard post emacs init
(cj/make-buffer-undead "*dashboard*") ;; make this buffer unkillable
@@ -185,16 +193,14 @@ window."
(setq recentf-exclude '("/emms/history")) ;; exclude EMMS history from recent files
(setq dashboard-set-footer nil) ;; don't show footer and quotes
- ;; == banner
- (setq dashboard-startup-banner (concat user-emacs-directory "assets/M-x_butterfly.png"))
- (setq dashboard-banner-logo-title "Emacs: The Editor That Saves Your Soul")
-
;; == navigation
(setq dashboard-set-navigator t)
(setq dashboard-navigator-buttons (cj/dashboard--navigator-rows))
;; == content
(setq dashboard-show-shortcuts nil) ;; don't show dashboard item abbreviations
+ (when (get-buffer "*dashboard*")
+ (dashboard-refresh-buffer))
) ;; end use-package dashboard
;; ------------------------ Dashboard Keybindings ------------------------------