emacs: refactor dashboard

This commit is contained in:
Jeremy Baxter 2024-05-26 16:08:33 +12:00
parent 51ed16665d
commit a589a771e1

View file

@ -250,26 +250,17 @@ One will be created if none exist."
;; dashboard ;; dashboard
(package-install 'dashboard) (package-install 'dashboard)
(defun make-quote ()
(interactive)
(let ((quotes
'("At its core is an interpreter for Emacs Lisp."
"Only one segfault in the default install, in a heck of a long time!"
"Merely an interface to your code."
"M-x eglot"
"“We don't use the term corelibs, and I am not sure what that would mean.”"
"50 years and Dired is still the best file manager on the planet")))
(nth (random (length quotes)) quotes)))
(setq dashboard-banner-logo-title "Welcome to GNU Emacs, one component of the GNU/Linux operating system." (setq dashboard-banner-logo-title "Welcome to GNU Emacs, one component of the GNU/Linux operating system."
dashboard-startup-banner "~/pix/jemacs-book.png" dashboard-startup-banner "~/pix/jemacs-book.png"
dashboard-center-content t dashboard-center-content t
dashboard-vertically-center-content t dashboard-vertically-center-content t
dashboard-items dashboard-items '((bookmarks . 4)
'((bookmarks . 8) (recents . 4))
(recents . 4)) dashboard-footer-messages (list
dashboard-footer-messages `(,(make-quote)) "At its core is an interpreter for Emacs Lisp."
"Merely an interface to your code."
"“We don't use the term corelibs, and I am not sure what that would mean.”"
"50 years and Dired is still the best file manager on the planet")
initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name))) initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name)))
(add-hook 'after-init-hook 'dashboard-insert-startupify-lists) (add-hook 'after-init-hook 'dashboard-insert-startupify-lists)