I showed you my source code, pls respond
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.
 
 
 

2.8 KiB

Dashboard

/chris/dotfiles/src/commit/95e5ba05d8d782407e50d03b3a4117c5b31a759c/docs/images/desktop.png

Present a Dashboard 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.

(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 'logo)
          (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"))