From 7b4a1af181ae0d2c0737c24b56b2034d3944725b Mon Sep 17 00:00:00 2001 From: JesusMtnez Date: Mon, 3 Jun 2019 07:52:05 +0200 Subject: [PATCH 1/2] Do not use all-the-icons if it is not available for the footer --- dashboard-widgets.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dashboard-widgets.el b/dashboard-widgets.el index 11274627..7953d0d0 100644 --- a/dashboard-widgets.el +++ b/dashboard-widgets.el @@ -111,10 +111,14 @@ to the specified width, with aspect ratio preserved." (nth (random (1- (1+ (length list)))) list)) "A footer with some short message.") -(defvar dashboard-footer-icon (all-the-icons-fileicon "emacs" - :height 1.1 - :v-adjust -0.05 - :face 'font-lock-keyword-face) +(defvar dashboard-footer-icon + (if (or (fboundp 'all-the-icons-fileicon) + (require 'all-the-icons nil 'noerror)) + (all-the-icons-fileicon "emacs" + :height 1.1 + :v-adjust -0.05 + :face 'font-lock-keyword-face) + ">") "Footer's icon.") (defvar dashboard-startup-banner 'official From f27b3b940f3c44c0cd336865317e20c7e71c2524 Mon Sep 17 00:00:00 2001 From: JesusMtnez Date: Mon, 3 Jun 2019 07:56:59 +0200 Subject: [PATCH 2/2] Untabify and re-indent code in README --- README.org | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.org b/README.org index 33a4e8fb..47df488a 100644 --- a/README.org +++ b/README.org @@ -74,11 +74,11 @@ To update the banner or banner title To customize which widgets are displayed, you can use the following snippet #+BEGIN_SRC elisp - (setq dashboard-items '((recents . 5) - (bookmarks . 5) - (projects . 5) - (agenda . 5) - (registers . 5))) +(setq dashboard-items '((recents . 5) + (bookmarks . 5) + (projects . 5) + (agenda . 5) + (registers . 5))) #+END_SRC This will add the recent files, bookmarks, projects, org-agenda and registers widgets to your dashboard each displaying 5 items. @@ -92,39 +92,39 @@ To add your own custom widget is pretty easy, define your widget's callback func To add icons to the widget headings and their items: #+BEGIN_SRC elisp - (setq dashboard-set-heading-icons t) - (setq dashboard-set-file-icons t) +(setq dashboard-set-heading-icons t) +(setq dashboard-set-file-icons t) #+END_SRC To modify heading icons with another icon from all-the-icons octicons: #+BEGIN_SRC elisp - (dashboard-modify-heading-icons '((recents . "file-text") - (bookmarks . "book"))) +(dashboard-modify-heading-icons '((recents . "file-text") + (bookmarks . "book"))) #+END_SRC To show info about the packages loaded and the init time: #+BEGIN_SRC elisp - (setq dashboard-set-init-info t) +(setq dashboard-set-init-info t) #+END_SRC Also, the message can be customized like this: #+BEGIN_SRC elisp - (setq dashboard-init-info "This is an init message!") +(setq dashboard-init-info "This is an init message!") #+END_SRC A randomly selected footnote will be displayed. To disable it: #+BEGIN_SRC elisp - (setq dashboard-set-footer nil) +(setq dashboard-set-footer nil) #+END_SRC To customize it and customize its icon; #+BEGIN_SRC elisp - (setq dashboard-footer "Dashboard is pretty cool!") - (setq dashboard-footer-icon (all-the-icons-octicon "dashboard" - :height 1.1 - :v-adjust -0.05 - :face 'font-lock-keyword-face)) +(setq dashboard-footer "Dashboard is pretty cool!") +(setq dashboard-footer-icon (all-the-icons-octicon "dashboard" + :height 1.1 + :v-adjust -0.05 + :face 'font-lock-keyword-face)) #+END_SRC ** Org mode’s agenda