From d67597094043686753546b3e3e218f3e5afe8366 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Wed, 3 Feb 2021 15:00:19 -0500 Subject: [PATCH] Dashboard upgrades --- README.org | 26 ++++++++++++++++++++++++++ modules/interface.el | 18 ++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/README.org b/README.org index ef33bff..4997f74 100644 --- a/README.org +++ b/README.org @@ -1150,6 +1150,7 @@ Present a dashboard when first launching Emacs. dashboard-set-init-info t dashboard-set-file-icons t dashboard-set-heading-icons t + dashboard-set-navigator t dashboard-startup-banner 'logo dashboard-projects-backend 'projectile dashboard-items '((projects . 5) @@ -1158,6 +1159,31 @@ Present a dashboard when first launching Emacs. (dashboard-setup-startup-hook)) #+end_src +Customize the buttons of the navigator: + ++  Brain @ http://localhost:8080 ++  Homepage @ https://chrishayward.xyz ++  Athabasca @ https://login.athabascau.ca/cas/login + +#+begin_src emacs-lisp +(setq dashboard-navigator-buttons + `(;; First row. + ((,(all-the-icons-fileicon "brain" :height 1.1 :v-adjust 0.0) + "Brain" + "Knowledge base" + (lambda (&rest _) (browse-url "http://localhost:8080")))) + ;; Second row. + ((,(all-the-icons-material "public" :height 1.1 :v-adjust 0.0) + "Homepage" + "Personal website" + (lambda (&rest _) (browse-url "https://chrishayward.xyz")))) + ;; Third row. + ((,(all-the-icons-faicon "university" :height 1.1 :v-adjust 0.0) + "Athabasca" + "Univeristy login" + (lambda (&rest _) (browse-url "https://login.athabascau.ca/cas/login")))))) +#+end_src + When running in *daemon* mode, ensure that the dashboard is the initial buffer. #+begin_src emacs-lisp diff --git a/modules/interface.el b/modules/interface.el index eb02363..90a458b 100644 --- a/modules/interface.el +++ b/modules/interface.el @@ -47,6 +47,7 @@ dashboard-set-init-info t dashboard-set-file-icons t dashboard-set-heading-icons t + dashboard-set-navigator t dashboard-startup-banner 'logo dashboard-projects-backend 'projectile dashboard-items '((projects . 5) @@ -54,6 +55,23 @@ (agenda . 5 ))) (dashboard-setup-startup-hook)) +(setq dashboard-navigator-buttons + `(;; First row. + ((,(all-the-icons-fileicon "brain" :height 1.1 :v-adjust 0.0) + "Brain" + "Knowledge base" + (lambda (&rest _) (browse-url "http://localhost:8080")))) + ;; Second row. + ((,(all-the-icons-material "public" :height 1.1 :v-adjust 0.0) + "Homepage" + "Personal website" + (lambda (&rest _) (browse-url "https://chrishayward.xyz")))) + ;; Third row. + ((,(all-the-icons-faicon "university" :height 1.1 :v-adjust 0.0) + "Athabasca" + "Univeristy login" + (lambda (&rest _) (browse-url "https://login.athabascau.ca/cas/login")))))) + (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))