0

I am using the dashboard package which allows you to either use your own .png image on your splash page or makes you pick from a set of ascii logos. For some reason, it doesn't allow you to choose your own ascii logo.

I would like to use el-patch in combination with straight and use-package to modify the function that loads the predefined ascii logos and point it towards my ascii logo.

I'm having trouble groking exactly how to do this. Because the function in question is imported from the dashboard-widgets library. So I need access to that library before loading dashboard but not quite sure how I can do that.

Here is my current dashboard setup, when starting my emacs, I get the warning that it can't find my logo, indicating the el-patch didn't work.

(use-package dashboard-widgets
  :demand t
  :straight dashboard
  :init/el-patch
  (el-patch-defun dashboard-get-banner-path (index)
    "Return the full path to banner with index INDEX."
    (concat (el-patch-swap dashboard-banners-directory djm--assets-directory) (format "%d.txt" index))))


(use-package dashboard
  :demand t
  :hook (dashboard-mode . hide-mode-line-mode)
  :init
  (dashboard-setup-startup-hook)
  :custom
  (dashboard-items '((recents . 3)
                     (projects . 3)
                     (bookmarks . 3)
                     (agenda . 5)))
  :config
  (setq dashboard-set-file-icons t)
  (setq dashboard-heading-icons t)
  (setq dashboard-startup-banner 4) ;; this is my logo (OG logos only go 1-3)
  (setq dashboard-page-separator "\n\n")
  (setq dashboard-center-content t)
  (setq dashboard-footer "djm emacs configuration 2019")
  (setq dashboard-footer-icon (all-the-icons-wicon "moon-4"
                                                   :height 1.05
                                                   :v-adjust -0.05
                                                   :face 'font-lock-keyword-face))
  (set-face-attribute 'dashboard-text-banner nil :foreground "#4e4e4e")
  (set-face-attribute 'dashboard-footer nil :foreground "#4e4e4e"))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.