From 17cbd912363823278c7ce3df8f98363bbf2cf2ed Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 23 Jan 2023 13:29:52 +0100 Subject: [PATCH] Emacs: Fix dashboard startup --- .config/emacs/site-lisp/dot-keybinds.el | 2 +- .config/emacs/site-lisp/dot-ui.el | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/.config/emacs/site-lisp/dot-keybinds.el b/.config/emacs/site-lisp/dot-keybinds.el index 7f071b4..d89b213 100644 --- a/.config/emacs/site-lisp/dot-keybinds.el +++ b/.config/emacs/site-lisp/dot-keybinds.el @@ -409,7 +409,7 @@ "b" '(:ignore t :which-key "buffer/bookmark") "b a" '(auto-revert-mode :which-key "Auto revert 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 m" '(bookmark-set :which-key "Make bookmark") "b n" '(evil-buffer-new :which-key "New empty buffer") diff --git a/.config/emacs/site-lisp/dot-ui.el b/.config/emacs/site-lisp/dot-ui.el index d1b52c9..69ef456 100644 --- a/.config/emacs/site-lisp/dot-ui.el +++ b/.config/emacs/site-lisp/dot-ui.el @@ -117,7 +117,7 @@ (:require dashboard) (:hook dot/hook-disable-line-numbers) (: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-center-content t) (setq dashboard-page-separator "\n\f\n") @@ -131,15 +131,6 @@ (bookmarks . 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.. (defun dot/dashboard-goto-bookmarks () @@ -157,9 +148,7 @@ (interactive) (funcall (local-key-binding "r"))) - (let ((command-line-args '("emacs"))) ;; TODO: Remove this when switching over - (dashboard-setup-startup-hook) - ) + (dashboard-setup-startup-hook) )) ;; -----------------------------------------