Change dashboard startup behavior.

This commit is contained in:
kj 2025-04-09 14:08:46 -03:00
parent ad54b6e3c9
commit cf7b239bcb
2 changed files with 5 additions and 20 deletions

View File

@ -129,11 +129,6 @@
(set-face-attribute 'default nil :font "Fira Code Retina" :height 112) (set-face-attribute 'default nil :font "Fira Code Retina" :height 112)
(scroll-bar-mode -1) (scroll-bar-mode -1)
;; Abrir primero el dashboard
(setq initial-buffer-choice (lambda ()
(get-buffer "*dashboard*")
(dashboard-refresh-buffer)))
;; Cerrar buffers al cerrar emacsclient ;; Cerrar buffers al cerrar emacsclient
;; (add-hook 'delete-frame-functions ;; (add-hook 'delete-frame-functions
;; (lambda (frame) ;; (lambda (frame)

View File

@ -58,20 +58,7 @@
;; Un bonito y sencillo panel de inicio ;; Un bonito y sencillo panel de inicio
(use-package dashboard (use-package dashboard
:defer t :defer t
:hook :init
(elpaca-after-init . (lambda ()
"Refrescamos el dashboard con la agenda luego de cargar todo"
(when (< (length command-line-args) 2)
(dashboard-open)
(run-at-time 1 nil (lambda()
"Recargamos el buffers con los items de manera asincrónica"
(setq dashboard-items '(
;; (recents . 10)
(agenda . 10)
))
(dashboard-refresh-buffer))) ;; Refrescamos el buffer sin bloquear emacs
)))
:config
(setq dashboard-set-file-icons t (setq dashboard-set-file-icons t
dashboard-set-heading-icons t dashboard-set-heading-icons t
dashboard-set-file-icons t dashboard-set-file-icons t
@ -79,7 +66,10 @@
dashboard-agenda-time-string-format "%Y-%m-%d %H:%M") dashboard-agenda-time-string-format "%Y-%m-%d %H:%M")
(setq dashboard-startup-banner (setq dashboard-startup-banner
(expand-file-name "duck.svg" user-emacs-directory)) (expand-file-name "duck.svg" user-emacs-directory))
(setq dashboard-items '()) (setq dashboard-items '(
(recents . 10)
;; (agenda . 10)
))
) )
;; Coloca en emacs la documentacón distribuída por devdocs.io ;; Coloca en emacs la documentacón distribuída por devdocs.io