Files
.emacs.d/lisp/init-dashboard.el
trogloxene c7352d0460 feat: add dashboard and enhance completion
- Add startup dashboard with recent files and bookmarks
- Enhance corfu with icons and minibuffer transfer
- Add avy-zap, markdown-mode, consult-dir
- Optimize GC settings and editor config
2026-04-02 14:56:29 +08:00

35 lines
1.6 KiB
EmacsLisp

;;; init-dashboard.el --- dashboard -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(use-package dashboard
:demand t
:config
(dashboard-setup-startup-hook)
(setq dashboard-banner-logo-title (format "%s" emacs-version))
(setq dashboard-banner-ascii " ##### # # # # ####### # # # ##### ##### \n# # ## # # # # ## ## # # # # # # \n# # # # # # # # # # # # # # # \n# #### # # # # # ##### # # # # # # ##### \n# # # # # # # # # # ####### # # \n# # # ## # # # # # # # # # # # \n ##### # # ##### ####### # # # # ##### ##### ")
(setq dashboard-startup-banner 'ascii)
(setq dashboard-center-content t)
(setq dashboard-navigation-cycle t)
(setq dashboard-items '((recents . 10)
(bookmarks . 5)
(projects . 5)))
(add-hook 'emacs-startup-hook
(lambda()
(setq my-emacs-startup-time (format-time-string "%Y-%m-%d %H:%M:%S"))))
(defun my/dashboard-insert-copyright ()
"Insert copyright in the footer."
(dashboard-insert-center
(propertize (format "\n\nEmacs started at %s" my-emacs-startup-time)
'face 'font-lock-comment-face)))
(advice-add #'dashboard-insert-footer :after #'my/dashboard-insert-copyright)
(setq dashboard-footer-messages '(
"Hello."
"Hi."
)))
(provide 'init-dashboard)
;;; init-dashboard.el ends here