summaryrefslogtreecommitdiff
path: root/dashboard.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2026-05-28 15:22:12 +0800
committerJSDurand <mmemmew@gmail.com>2026-05-28 15:22:12 +0800
commit77eeac78b93087198479e01039e0bee68ab31eb9 (patch)
treec5f7e3ffb7c3cd8a9d772e9da7a70380508fa906 /dashboard.el
parent19d96c8f67b124b31b4c95e44ae77b5a01598566 (diff)
dashboard: durand-view-map is not loaded before dashboard.
* dashboard.el (dashboard-load-view-map): I have to define a wrapper for this key so that dashboard can automatically define the key once the view-conf.el is loaded.
Diffstat (limited to 'dashboard.el')
-rw-r--r--dashboard.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/dashboard.el b/dashboard.el
index 988cd8c..ae2a081 100644
--- a/dashboard.el
+++ b/dashboard.el
@@ -159,6 +159,8 @@ common functionalities more conveniently."
mode-line-format
(list "%e" (list :eval (list 'modeline-format-dashboard)))))
+()
+
(let ((m dashboard-mode-map))
(define-key m (vector ?l) #'blist)
(define-key m (vector ?L) #'rlist-list-registers)
@@ -169,6 +171,7 @@ common functionalities more conveniently."
(define-key m (vector ?o) #'durand-open-object)
(define-key m (vector ?g) #'gnus)
(define-key m (vector ?h) #'durand-ibuffer)
+ (define-key m (vector ?e) #'eshell)
(define-key m (vector ?f) #'find-file)
(define-key m (vector ?F) #'find-file-other-tab)
(define-key m (vector ?a) #'dashboard-org-agenda)
@@ -177,8 +180,17 @@ common functionalities more conveniently."
(define-key m (vector ?p) #'project-switch-project)
(define-key m (vector ?x) #'execute-extended-command)
(define-key m (vector ?w) #'durand-wifi-toggle)
+ (define-key m (vector ?v) #'dashboard-load-view-map)
(define-key m (vector ?n) #'novel))
+;;; Define a wrapper for loading view-conf if needed.
+
+(defun dashboard-load-view-map ()
+ "Load view-conf.el and then change the binding in dashboard mode."
+ (interactive)
+ (load-config "view-conf.el")
+ (define-key dashboard-mode-map (vector ?v) durand-view-map))
+
;;; Define novel command as a wrapper, if not already loaded
(cond