diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-25 13:15:21 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-25 13:15:21 -0500 |
| commit | 4586325327b4b1ad5885c91437a774e45332657a (patch) | |
| tree | bb99d6e800137af95e4f890a0e91ee2f3b18a06e | |
| parent | 3bd514d9841429ba8a5b02819e7e10950c62ab8e (diff) | |
| download | dotemacs-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.
| -rw-r--r-- | assets/M-x_butterfly.png | bin | 92971 -> 75822 bytes | |||
| -rw-r--r-- | assets/M-x_butterfly.png.bak | bin | 0 -> 92971 bytes | |||
| -rw-r--r-- | modules/dashboard-config.el | 14 |
3 files changed, 10 insertions, 4 deletions
diff --git a/assets/M-x_butterfly.png b/assets/M-x_butterfly.png Binary files differindex 4e6a26b5..af86d67a 100644 --- a/assets/M-x_butterfly.png +++ b/assets/M-x_butterfly.png diff --git a/assets/M-x_butterfly.png.bak b/assets/M-x_butterfly.png.bak Binary files differnew file mode 100644 index 00000000..4e6a26b5 --- /dev/null +++ b/assets/M-x_butterfly.png.bak 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 ------------------------------ |
