Browse Source

Emacs: Fix dashboard startup

master
Riyyi 2 years ago
parent
commit
17cbd91236
  1. 2
      .config/emacs/site-lisp/dot-keybinds.el
  2. 15
      .config/emacs/site-lisp/dot-ui.el

2
.config/emacs/site-lisp/dot-keybinds.el

@ -409,7 +409,7 @@
"b" '(:ignore t :which-key "buffer/bookmark") "b" '(:ignore t :which-key "buffer/bookmark")
"b a" '(auto-revert-mode :which-key "Auto revert buffer") "b a" '(auto-revert-mode :which-key "Auto revert buffer")
"b b" '(consult-buffer :which-key "Switch buffer") "b b" '(consult-buffer :which-key "Switch buffer")
"b d" '(dot/dashboard-goto :which-key "Dashboard") "b d" '(dashboard-refresh-buffer :which-key "Dashboard")
"b k" '(kill-current-buffer :which-key "Kill buffer") "b k" '(kill-current-buffer :which-key "Kill buffer")
"b m" '(bookmark-set :which-key "Make bookmark") "b m" '(bookmark-set :which-key "Make bookmark")
"b n" '(evil-buffer-new :which-key "New empty buffer") "b n" '(evil-buffer-new :which-key "New empty buffer")

15
.config/emacs/site-lisp/dot-ui.el

@ -117,7 +117,7 @@
(:require dashboard) (:require dashboard)
(:hook dot/hook-disable-line-numbers) (:hook dot/hook-disable-line-numbers)
(:when-loaded (:when-loaded
(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))) (setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*") (dashboard-refresh-buffer)))
(setq dashboard-banner-logo-title "GNU Emacs master race!") (setq dashboard-banner-logo-title "GNU Emacs master race!")
(setq dashboard-center-content t) (setq dashboard-center-content t)
(setq dashboard-page-separator "\n\f\n") (setq dashboard-page-separator "\n\f\n")
@ -131,15 +131,6 @@
(bookmarks . 5) (bookmarks . 5)
(recents . 5))) (recents . 5)))
(defun dot/dashboard-goto ()
"Go to the *dashboard* buffer, create if non-existing."
(interactive)
(let ((buffer "*dashboard*"))
(unless (get-buffer buffer)
(generate-new-buffer buffer)
(dashboard-refresh-buffer))
(switch-to-buffer buffer)))
;; Fix keybinds.. ;; Fix keybinds..
(defun dot/dashboard-goto-bookmarks () (defun dot/dashboard-goto-bookmarks ()
@ -157,9 +148,7 @@
(interactive) (interactive)
(funcall (local-key-binding "r"))) (funcall (local-key-binding "r")))
(let ((command-line-args '("emacs"))) ;; TODO: Remove this when switching over (dashboard-setup-startup-hook)
(dashboard-setup-startup-hook)
)
)) ))
;; ----------------------------------------- ;; -----------------------------------------

Loading…
Cancel
Save