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 * Dashboard
Emacs Dashboard is an extensible startup screen showing you recent files, bookmarks, agenda items and an Emacs banner. Emacs Dashboard is an extensible startup screen showing you recent files, bookmarks, agenda items and an Emacs banner.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package dashboard (use-package dashboard
:ensure t :ensure t
:after nerd-icons :after (:all nerd-icons org org-agenda org-roam)
:init :init
(setq initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name))) (setq initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name)))
(setq dashboard-week-agenda t) (setq dashboard-week-agenda t)
;;(setq dashboard-filter-agenda-entry 'dashboard-no-filter-agenda) ;;(setq dashboard-filter-agenda-entry 'dashboard-no-filter-agenda)
(setq dashboard-display-icons-p t) ; display icons on both GUI and terminal (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-icon-type 'nerd-icons) ; use `nerd-icons' package
(setq dashboard-set-heading-icons t) (setq dashboard-set-heading-icons t)
(setq dashboard-projects-backend 'project-el) (setq dashboard-projects-backend 'project-el)
(setq dashboard-set-file-icons t) (setq dashboard-set-file-icons t)
(setq dashboard-banner-logo-title "Emacs Is More Than A Text Editor!") (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 '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-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-center-content nil) ;; set to 't' for centered content
(setq dashboard-items '((recents . 5) (setq dashboard-items '((recents . 5)
(agenda . 5 ) (agenda . 5 )
(bookmarks . 3) (bookmarks . 3)
(projects . 3) (projects . 3)
(registers . 3))) (registers . 3)))
(setq dashboard-startupify-list '(dashboard-insert-banner (setq dashboard-startupify-list '(dashboard-insert-banner
dashboard-insert-newline dashboard-insert-newline
dashboard-insert-banner-title dashboard-insert-banner-title
dashboard-insert-newline dashboard-insert-newline
dashboard-insert-navigator dashboard-insert-navigator
dashboard-insert-newline dashboard-insert-newline
dashboard-insert-init-info dashboard-insert-init-info
dashboard-insert-items dashboard-insert-items
dashboard-insert-newline dashboard-insert-newline
dashboard-insert-footer)) dashboard-insert-footer))
(setq dashboard-navigator-buttons (setq dashboard-navigator-buttons
`(;; Line 1 `(;; Line 1
((,(nerd-icons-mdicon "nf-md-inbox" :height 1.1 :v-adjust 0.0) ((,(nerd-icons-mdicon "nf-md-inbox" :height 1.1 :v-adjust 0.0)
"To Inbox" "To Inbox"
"Capture to inbox" "Capture to inbox"
(lambda (&rest _) (kylekrein/org-roam-capture-inbox))) (lambda (&rest _) (kylekrein/org-roam-capture-inbox)))
(,(nerd-icons-mdicon "nf-md-calendar" :height 1.1 :v-adjust 0.0) (,(nerd-icons-mdicon "nf-md-calendar" :height 1.1 :v-adjust 0.0)
"Agenda" "Agenda"
"View agenda" "View agenda"
(lambda (&rest _) (org-agenda))) (lambda (&rest _) (org-agenda)))
(,(nerd-icons-mdicon "nf-md-note" :height 1.1 :v-adjust 0.0) (,(nerd-icons-mdicon "nf-md-note" :height 1.1 :v-adjust 0.0)
"Note" "Note"
"Find a note" "Find a note"
(lambda (&rest _) (org-roam-node-find)))) (lambda (&rest _) (org-roam-node-find))))
;; Line 2 ;; Line 2
((,(nerd-icons-mdicon "nf-md-sync" :height 1.1 :v-adjust 0.0) ((,(nerd-icons-mdicon "nf-md-sync" :height 1.1 :v-adjust 0.0)
"Sync" "Sync"
"Sync org-roam and agenda" "Sync org-roam and agenda"
(lambda (&rest _) (lambda (&rest _)
(org-roam-db-sync) (org-roam-db-sync)
(org-agenda-redo) (org-agenda-redo)
(message "Org-Roam and Agenda synced!"))) (message "Org-Roam and Agenda synced!")))
(,(nerd-icons-mdicon "nf-md-calendar_today" :height 1.1 :v-adjust 0.0) (,(nerd-icons-mdicon "nf-md-calendar_today" :height 1.1 :v-adjust 0.0)
"Today" "Today"
"View today's tasks" "View today's tasks"
(lambda (&rest _) (org-agenda nil "a")))))) (lambda (&rest _) (org-agenda nil "a"))))))
:custom :custom
(dashboard-modify-heading-icons '((recents . "nf-oct-file_text") (dashboard-modify-heading-icons '((recents . "nf-oct-file_text")
(bookmarks . "nf-oct-book"))) (bookmarks . "nf-oct-book")))
:config :config
(dashboard-setup-startup-hook)) (dashboard-setup-startup-hook))
#+end_src #+end_src
* Diminish * 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. 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.