From f9176904e95d392d45c26e37c5354e4d575f3b05 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 24 May 2025 11:59:26 -0500 Subject: don't display dashboard when starting a file --- modules/dashboard-config.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/dashboard-config.el b/modules/dashboard-config.el index aa6ea286d..c17503cf5 100644 --- a/modules/dashboard-config.el +++ b/modules/dashboard-config.el @@ -7,6 +7,8 @@ ;;; Code: + + ;; ------------------------ Dashboard Bookmarks Override ----------------------- ;; overrides the bookmark insertion from the dashboard package to provide an ;; option that only shows the bookmark name, avoiding the path. Paths are often @@ -86,7 +88,9 @@ ;; == general (dashboard-setup-startup-hook) ;; run dashboard post emacs init - ;; (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ;; display dashboard on startup + + (if (< (length command-line-args) 2) + (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))) ;; don't display dashboard if opening a file (setq dashboard-display-icons-p t) ;; display icons on both GUI and terminal (setq dashboard-icon-type 'nerd-icons) ;; use `nerd-icons' package (setq dashboard-center-content t) ;; horizontally center dashboard content -- cgit v1.2.3