(Emacs)+demand dashboard package and setup initial-buffer-choice
The dashboard is the first thing I should see when entering Emacs, hence I should demand the package instead of deferring it. Doing so means that dashboard is loaded instantly and will generate the =*dashboard*= buffer, which I can set =initial-buffer-choice= to be.
This commit is contained in:
@@ -1217,6 +1217,7 @@ initial startup screen in default Emacs.
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package dashboard
|
(use-package dashboard
|
||||||
:straight t
|
:straight t
|
||||||
|
:demand t
|
||||||
:general
|
:general
|
||||||
(leader
|
(leader
|
||||||
"ab" #'dashboard-refresh-buffer)
|
"ab" #'dashboard-refresh-buffer)
|
||||||
@@ -1225,7 +1226,8 @@ initial startup screen in default Emacs.
|
|||||||
:keymaps 'dashboard-mode-map
|
:keymaps 'dashboard-mode-map
|
||||||
"q" (proc (interactive) (kill-this-buffer)))
|
"q" (proc (interactive) (kill-this-buffer)))
|
||||||
:init
|
:init
|
||||||
(setq dashboard-banner-logo-title "Oreomacs"
|
(setq initial-buffer-choice "*dashboard*"
|
||||||
|
dashboard-banner-logo-title "Oreomacs"
|
||||||
dashboard-center-content t
|
dashboard-center-content t
|
||||||
dashboard-set-init-info t
|
dashboard-set-init-info t
|
||||||
dashboard-startup-banner (no-littering-expand-etc-file-name "dashboard/logo.png")
|
dashboard-startup-banner (no-littering-expand-etc-file-name "dashboard/logo.png")
|
||||||
@@ -1235,7 +1237,6 @@ initial startup screen in default Emacs.
|
|||||||
(recents . 5)))
|
(recents . 5)))
|
||||||
:config
|
:config
|
||||||
(dashboard-setup-startup-hook)
|
(dashboard-setup-startup-hook)
|
||||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
|
|
||||||
|
|
||||||
(general-def
|
(general-def
|
||||||
:states '(normal motion)
|
:states '(normal motion)
|
||||||
|
|||||||
Reference in New Issue
Block a user