commit 2e3054f11b559145e8eebebadd1f1b7c79404264
parent 3a3586aff602cf49a8545ffb4ce760e78c3718db
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Wed, 20 Mar 2019 10:36:18 -0400
Use dashboard-insert-section to add config files.
Diffstat:
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
@@ -1238,10 +1238,13 @@ Create widget to display important config files. Use ~c~ to jump to this section
(defun user/dashboard-insert-configs (list-size)
"Add a list of config files."
- (when (dashboard-insert-recentf-list
- "Config Files:"
- (dashboard-subseq user/config-file-list 0 (length user/config-file-list)))
- (dashboard-insert-shortcut "c" "Config Files:")))
+ (dashboard-insert-section
+ "Config Files:"
+ user/config-file-list
+ list-size
+ "c"
+ `(lambda (&rest ignore) (find-file-existing ,el))
+ (abbreviate-file-name el)))
(add-to-list 'dashboard-item-generators '(configs . user/dashboard-insert-configs))
#+END_SRC