You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3.2 KiB
3.2 KiB
Dashboard
Present a Dashboard1 when first launching Emacs. Customize the buttons of the navigator.
Configuration
Goal of this module is to provide an easily customizable dashboard buffer to display when launching Emacs. I also want it to include some custom links. These are hard coded right now but I want to move them to Options.
-
Brain @ http://localhost:8080
-
Homepage @ https://chrishayward.xyz
-
Athabasca @ https://login.athabascau.ca/cas/login
-
Bookshelf @ https://online.vitalsource.com
(use-package dashboard :custom (dashboard-center-content t) (dashboard-set-init-info t) (dashboard-set-file-icons t) (dashboard-set-heading-icons t) (dashboard-set-navigator t) (dashboard-startup-banner (expand-file-name "~/.emacs.d/docs/images/emacs.png")) (dashboard-projects-backend 'projectile) (dashboard-items '((projects . 10) (recents . 10) (agenda . 10))) (dashboard-navigator-buttons `(((,(all-the-icons-fileicon "brain" :height 1.1 :v-adjust 0.0) "Brain" "Knowledge base" (lambda (&rest _) (browse-url "http://localhost:8080")))) ((,(all-the-icons-material "public" :height 1.1 :v-adjust 0.0) "Homepage" "Personal website" (lambda (&rest _) (browse-url "https://chrishayward.xyz")))) ((,(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")))) ((,(all-the-icons-faicon "book" :height 1.1 :v-adjust 0.0) "Bookshelf" "Vitalsource bookshelf" (lambda (&rest _) (browse-url "https://online.vitalsource.com")))))) :config (dashboard-setup-startup-hook))
Default buffer
Ensure that the dashboard is the initial buffer.
(with-eval-after-load 'dashboard (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))))
Keybinding
Quickly navigate to the dashboard with SPC SPC
.
(dotfiles/leader "SPC" '((lambda () (interactive) (switch-to-buffer "*dashboard*")) :which-key "Dashboard"))
Navigate to the scratch buffer with SPC C-SPC
.
(dotfiles/leader "C-SPC" '((lambda () (interactive) (switch-to-buffer "*scratch*")) :which-key "Scratch"))