update/fix dashboard

This commit is contained in:
2025-06-15 22:54:08 +02:00
parent 3a0b45f037
commit a310ee8795
2 changed files with 94 additions and 53 deletions

View File

@@ -105,6 +105,11 @@ DISPLAY-START: `integer', e.g. 3820"
(use-package tab-bar
:defer 0.5
:bind ((:map global-map
(("s-{" . tab-bar-switch-to-prev-tab)
("s-}" . tab-bar-switch-to-next-tab)
("s-t" . tab-bar-new-tab)
("s-w" . tab-bar-close-tab))))
:config
(add-to-list 'tab-bar-format #'tab-bar-format-menu-bar)
(tab-bar-mode)
@@ -230,6 +235,7 @@ DISPLAY-START: `integer', e.g. 3820"
:delight (dashboard-mode "Db") ;; "\u01F153
:config
;; see `dashboad-widget'
(setq dashboard-icon-type 'all-the-icons)
(setq dashboard-page-separator "\n\f\n")
(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)
@@ -240,60 +246,95 @@ DISPLAY-START: `integer', e.g. 3820"
(agenda . "calendar")
(projects . "rocket")
(registers . "database")))
(setq dashboard-startupify-list
'(dashboard-insert-banner
dashboard-insert-newline
dashboard-insert-banner-title
dashboard-insert-newline
dashboard-insert-init-info
dashboard-insert-newline
dashboard-insert-newline
dashboard-insert-navigator
dashboard-insert-items
dashboard-insert-newline
dashboard-insert-footer))
(if (display-graphic-p)
(require 'all-the-icons)
(let ()
(require 'all-the-icons)
(setq dashboard-navigator-buttons
;; list of lines having list of elements
;; element: (icon title help action face prefix suffix)
;; |------------------------- icon --------------------------------------|---- title ----|------ help ---------|------------- action ---------------------------------------|-face--|prefix|suffix|
`(;; 1st line custom views
(("" "" "space" nil default "" "")
("" "Custom Views:" "custom views" nil default "" "")
(,(all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1) "ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)) dashboard-navigator "" "")
(,(all-the-icons-alltheicon "python" :height 1.0 :v-adjust 0.0) "Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)) dashboard-navigator "" "")
(,(all-the-icons-alltheicon "script" :height 1.0 :v-adjust 0.0) "Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)) dashboard-navigator "" "")
(,(all-the-icons-octicon "file-media" :height 1.0 :v-adjust 0.0) "Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)) dashboard-navigator "" "")
(,(all-the-icons-octicon "file-pdf" :height 1.0 :v-adjust 0.0) "Org-PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf)) dashboard-navigator "" "")
)
;; 2nd line major modes 1st part
(("" "" "space" nil default "" "")
("" "Major Modes:" "major modes" nil default "" "")
("" "Deft" "deft" (lambda (&rest _) (deft)) dashboard-navigator "" "")
("" "EShell" "eshell-mode" (lambda (&rest _) (eshell)) dashboard-navigator "" "")
("" "Magit" "magit" (lambda (&rest _) (magit)) dashboard-navigator "" "")
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0) "Mu4e" "mu4e" (lambda (&rest _) (mu4e)) dashboard-navigator "" "")
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0) "Notmuch" "notmuch" (lambda (&rest _) (notmuch)) dashboard-navigator "" "")
("" "Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize)) dashboard-navigator "" "")
)
;; 3rd line major modes 2nd part
(("" "" "space" nil default "" "")
("" "Org-Drill" "org-drill" (lambda (&rest _) (org-drill)) dashboard-navigator "" "")
("" "Org-Roam" "org-raom-node-find" (lambda (&rest _) (org-roam-node-find nil "index")) dashboard-navigator "" "")
("" "Powershell" "powershell" (lambda (&rest _) (powershell)) dashboard-navigator "" "")
("" "Shell" "shell" (lambda (&rest _) (shell)) dashboard-navigator "" "")
("" "Treemacs" "treemacs" (lambda (&rest _) (treemacs)) dashboard-navigator "" "")
)
;; 4th line infos
(("" "" "space" nil default "" "")
(,(all-the-icons-material "help_outline" :height 1.1 :v-adjust -0.15) "Help" "?/h" (lambda (&rest _) (describe-mode)) dashboard-navigator "" "")
(,(all-the-icons-material "help_outline" :height 1.1 :v-adjust -0.15) "My-Help" "my-help" (lambda (&rest _) (my-help)) dashboard-navigator "" "")
(,(all-the-icons-material "refresh" :height 1.1 :v-adjust -0.15) "Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) dashboard-navigator "" "")
))))
(let ()
(setq dashboard-navigator-buttons
;; list of lines having list of elements
;; element: (icon title help action face prefix suffix)
`(;; 1st line custom views
(("" "Custom Views:" "custom views" nil default "" "")
(,(all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1) "ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)) )
(,(all-the-icons-alltheicon "python" :height 1.0 :v-adjust 0.0) "Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)) )
(,(all-the-icons-alltheicon "script" :height 1.0 :v-adjust 0.0) "Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)) )
(,(all-the-icons-octicon "file-media" :height 1.0 :v-adjust 0.0) "Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)) )
(,(all-the-icons-octicon "file-pdf" :height 1.0 :v-adjust 0.0) "Org PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf)) ))
;; 2nd line major modes 1st part
(("" "Major Modes:" "major modes" nil default "" "")
("" "Deft" "deft" (lambda (&rest _) (deft)) )
("" "EShell" "eshell-mode" (lambda (&rest _) (eshell)) )
("" "Magit" "magit" (lambda (&rest _) (magit)) )
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0) "Mu4e" "mu4e" (lambda (&rest _) (mu4e)) )
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0) "Notmuch" "notmuch" (lambda (&rest _) (notmuch)) )
("" "Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize)) ))
;; 3rd line major modes 2nd part
(("" "Org-Drill" "org-drill" (lambda (&rest _) (org-drill)) )
("" "Powershell" "powershell" (lambda (&rest _) (powershell)) )
("" "Shell" "shell" (lambda (&rest _) (shell)) )
("" "Treemacs" "treemacs" (lambda (&rest _) (treemacs)) ))
;; 4th line infos
((,(all-the-icons-material "help_outline" :height 1.1 :v-adjust -0.15) "Help" "?/h" (lambda (&rest _) (describe-mode)) nil)
(,(all-the-icons-material "refresh" :height 1.1 :v-adjust -0.15) "Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) nil))))
(setq dashboard-navigator-buttons
;; list of lines having list of elements
;; element: (icon title help action face prefix suffix)
`(;; 1st line custom views
(("" "Custom Views:" "custom views" nil default "" "")
("" "ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)) )
("" "Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)) )
("" "Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)) )
("" "Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)) )
("" "Org PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf)) ))
;; 2nd line major modes 1st part
(("" "Major Modes:" "major modes" nil default "" "")
("" "Deft" "deft" (lambda (&rest _) (deft)) )
("" "EShell" "eshell-mode" (lambda (&rest _) (eshell)) )
("" "Magit" "magit" (lambda (&rest _) (magit)) )
("" "Mu4e" "mu4e" (lambda (&rest _) (mu4e)) )
("" "Notmuch" "notmuch" (lambda (&rest _) (notmuch)) )
("" "Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize)) ))
;; 3rd line major modes 2nd part
(("" "Org-Drill" "org-drill" (lambda (&rest _) (org-drill)) )
("" "Powershell" "powershell" (lambda (&rest _) (powershell)) )
("" "Shell" "shell" (lambda (&rest _) (shell)) )
("" "Treemacs" "treemacs" (lambda (&rest _) (treemacs)) ))
;; 4th line infos
(("" "Help" "?/h" (lambda (&rest _) (describe-mode)) nil)
("" "Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) nil)))))
;; list of lines having list of elements
;; element: (icon title help action face prefix suffix)
`(;; 1st line custom views
(("" "" "space" nil default "" "")
("" "Custom Views:" "custom views" nil default "" "")
("" "ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)) dashboard-navigator "" "")
("" "Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)) dashboard-navigator "" "")
("" "Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)) dashboard-navigator "" "")
("" "Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)) dashboard-navigator "" "")
("" "Org-PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf)) dashboard-navigator "" "")
)
;; 2nd line major modes 1st part
(("" "" "space" nil default "" "")
("" "Major Modes:" "major modes" nil default "" "")
("" "Deft" "deft" (lambda (&rest _) (deft)) dashboard-navigator "" "")
("" "EShell" "eshell-mode" (lambda (&rest _) (eshell)) dashboard-navigator "" "")
("" "Magit" "magit" (lambda (&rest _) (magit)) dashboard-navigator "" "")
("" "Mu4e" "mu4e" (lambda (&rest _) (mu4e)) dashboard-navigator "" "")
("" "Notmuch" "notmuch" (lambda (&rest _) (notmuch)) dashboard-navigator "" "")
("" "Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize)) dashboard-navigator "" "")
)
;; 3rd line major modes 2nd part
(("" "" "space" nil default "" "")
("" "Org-Drill" "org-drill" (lambda (&rest _) (org-drill)) dashboard-navigator "" "")
("" "Org-Roam" "org-raom-node-find" (lambda (&rest _) (org-roam-node-find nil "index")) dashboard-navigator "" "")
("" "Powershell" "powershell" (lambda (&rest _) (powershell)) dashboard-navigator "" "")
("" "Shell" "shell" (lambda (&rest _) (shell)) dashboard-navigator "" "")
("" "Treemacs" "treemacs" (lambda (&rest _) (treemacs)) dashboard-navigator "" "")
)
;; 4th line infos
(("" "" "space" nil default "" "")
("" "Help" "?/h" (lambda (&rest _) (describe-mode)) dashboard-navigator "" "")
("" "My-Help" "my-help" (lambda (&rest _) (my-help)) dashboard-navigator "" "")
("" "Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) dashboard-navigator "" "")
)))))
(setq dashboard-items '((recents . 10)
(bookmarks . 5)
;; (projects . 5)

View File

@@ -12,7 +12,7 @@
(setq sh-basic-offset 2))
(use-package powershell ;; https://melpa.org/#/powershell
:commands powershell-mode)
:commands (powershell powershell-mode))
(use-package eshell-mode
:defer t