move my to own directory and add a config update check button to dashboard

This commit is contained in:
2021-01-29 22:43:32 +01:00
parent 3f52b164d2
commit 84eb4929ee
6 changed files with 55 additions and 533 deletions

View File

@@ -236,7 +236,8 @@
;; (list "?" "" "?/h" (lambda (&rest _) (describe-mode)) nil "<" ">") ;;#'show-help
;; )))
(require 'all-the-icons)
(setq dashboard-navigator-buttons ;; Format: "(icon title help action face prefix suffix)"
(defun dashboard-navigator-buttons-func ()
;; Format: "(icon title help action face prefix suffix)"
`(( ;; views
("" "Custom Views:" "custom views" nil default "" "")
(,(all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1)
@@ -250,12 +251,12 @@
(,(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)))
)
( ;; major modes
( ;; major modes first line
("" "Major Modes:" "major modes" nil default "" "")
(""
"Deft" "deft" (lambda (&rest _) (deft)))
(""
"EShell" "eshell-mode" (lambda (&rest _) (eshell-mode)))
"EShell" "eshell-mode" (lambda (&rest _) (eshell)))
(""
"Magit" "magit" (lambda (&rest _) (magit)))
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0)
@@ -281,8 +282,10 @@
"Help" "?/h" (lambda (&rest _) (describe-mode)) nil) ;; #'show-help
(,(all-the-icons-material "refresh" :height 1.1 :v-adjust -0.15) ;; all-the-icons-octicon "sync"
"Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) nil)
("" ,(concat "Config: " (my-dashboard-config-update)) "config" (lambda (&rest _) (progn (my-dashboard-config-update) (setq dashboard-navigator-buttons (dashboard-navigator-buttons-func)) (dashboard-refresh-buffer))) default "" "")
)))
(setq dashboard-items '((recents . 5)
(setq dashboard-navigator-buttons (dashboard-navigator-buttons-func))
(setq dashboard-items '((recents . 10)
(bookmarks . 5)
;;(projects . 5)
;;(agenda . 5)