Fixed dashboard loading

This commit is contained in:
Aleksandr Lebedev 2025-02-03 00:28:08 +01:00
parent 2c95089534
commit a98cc117fc

View file

@ -389,73 +389,73 @@ By default, Emacs creates automatic backups of files in their original directori
* Dashboard
Emacs Dashboard is an extensible startup screen showing you recent files, bookmarks, agenda items and an Emacs banner.
#+begin_src emacs-lisp
(use-package dashboard
:ensure t
:after nerd-icons
:init
(setq initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name)))
(setq dashboard-week-agenda t)
;;(setq dashboard-filter-agenda-entry 'dashboard-no-filter-agenda)
(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-set-heading-icons t)
(setq dashboard-projects-backend 'project-el)
(setq dashboard-set-file-icons t)
(setq dashboard-banner-logo-title "Emacs Is More Than A Text Editor!")
(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
;;(setq dashboard-startup-banner "/home/dt/.config/emacs/images/emacs-dash.png") ;; use custom image as banner
(setq dashboard-center-content nil) ;; set to 't' for centered content
(setq dashboard-items '((recents . 5)
(agenda . 5 )
(bookmarks . 3)
(projects . 3)
(registers . 3)))
(setq dashboard-startupify-list '(dashboard-insert-banner
dashboard-insert-newline
dashboard-insert-banner-title
dashboard-insert-newline
dashboard-insert-navigator
dashboard-insert-newline
dashboard-insert-init-info
dashboard-insert-items
dashboard-insert-newline
dashboard-insert-footer))
(setq dashboard-navigator-buttons
`(;; Line 1
((,(nerd-icons-mdicon "nf-md-inbox" :height 1.1 :v-adjust 0.0)
"To Inbox"
"Capture to inbox"
(lambda (&rest _) (kylekrein/org-roam-capture-inbox)))
(use-package dashboard
:ensure t
:after (:all nerd-icons org org-agenda org-roam)
:init
(setq initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name)))
(setq dashboard-week-agenda t)
;;(setq dashboard-filter-agenda-entry 'dashboard-no-filter-agenda)
(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-set-heading-icons t)
(setq dashboard-projects-backend 'project-el)
(setq dashboard-set-file-icons t)
(setq dashboard-banner-logo-title "Emacs Is More Than A Text Editor!")
(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
;;(setq dashboard-startup-banner "/home/dt/.config/emacs/images/emacs-dash.png") ;; use custom image as banner
(setq dashboard-center-content nil) ;; set to 't' for centered content
(setq dashboard-items '((recents . 5)
(agenda . 5 )
(bookmarks . 3)
(projects . 3)
(registers . 3)))
(setq dashboard-startupify-list '(dashboard-insert-banner
dashboard-insert-newline
dashboard-insert-banner-title
dashboard-insert-newline
dashboard-insert-navigator
dashboard-insert-newline
dashboard-insert-init-info
dashboard-insert-items
dashboard-insert-newline
dashboard-insert-footer))
(setq dashboard-navigator-buttons
`(;; Line 1
((,(nerd-icons-mdicon "nf-md-inbox" :height 1.1 :v-adjust 0.0)
"To Inbox"
"Capture to inbox"
(lambda (&rest _) (kylekrein/org-roam-capture-inbox)))
(,(nerd-icons-mdicon "nf-md-calendar" :height 1.1 :v-adjust 0.0)
"Agenda"
"View agenda"
(lambda (&rest _) (org-agenda)))
(,(nerd-icons-mdicon "nf-md-calendar" :height 1.1 :v-adjust 0.0)
"Agenda"
"View agenda"
(lambda (&rest _) (org-agenda)))
(,(nerd-icons-mdicon "nf-md-note" :height 1.1 :v-adjust 0.0)
"Note"
"Find a note"
(lambda (&rest _) (org-roam-node-find))))
(,(nerd-icons-mdicon "nf-md-note" :height 1.1 :v-adjust 0.0)
"Note"
"Find a note"
(lambda (&rest _) (org-roam-node-find))))
;; Line 2
((,(nerd-icons-mdicon "nf-md-sync" :height 1.1 :v-adjust 0.0)
"Sync"
"Sync org-roam and agenda"
(lambda (&rest _)
(org-roam-db-sync)
(org-agenda-redo)
(message "Org-Roam and Agenda synced!")))
;; Line 2
((,(nerd-icons-mdicon "nf-md-sync" :height 1.1 :v-adjust 0.0)
"Sync"
"Sync org-roam and agenda"
(lambda (&rest _)
(org-roam-db-sync)
(org-agenda-redo)
(message "Org-Roam and Agenda synced!")))
(,(nerd-icons-mdicon "nf-md-calendar_today" :height 1.1 :v-adjust 0.0)
"Today"
"View today's tasks"
(lambda (&rest _) (org-agenda nil "a"))))))
(,(nerd-icons-mdicon "nf-md-calendar_today" :height 1.1 :v-adjust 0.0)
"Today"
"View today's tasks"
(lambda (&rest _) (org-agenda nil "a"))))))
:custom
(dashboard-modify-heading-icons '((recents . "nf-oct-file_text")
(bookmarks . "nf-oct-book")))
:config
(dashboard-setup-startup-hook))
:custom
(dashboard-modify-heading-icons '((recents . "nf-oct-file_text")
(bookmarks . "nf-oct-book")))
:config
(dashboard-setup-startup-hook))
#+end_src
* Diminish
This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add :diminish to any use-package block to hide that particular mode in the modeline.