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.

75 lines
2.8 KiB

  1. #+TITLE: Dashboard
  2. #+AUTHOR: Christopher James Hayward
  3. #+EMAIL: chris@chrishayward.xyz
  4. #+PROPERTY: header-args:emacs-lisp :tangle dashboard.el :comments org
  5. #+PROPERTY: header-args:shell :tangle no
  6. #+PROPERTY: header-args :results silent :eval no-export :comments org
  7. #+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil
  8. #+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
  9. #+ATTR_ORG: :width 420px
  10. #+ATTR_HTML: :width 420px
  11. #+ATTR_LATEX: :width 420px
  12. [[../docs/images/desktop.png]]
  13. Present a *Dashboard* when first launching Emacs. Customize the buttons of the navigator.
  14. * Configuration
  15. 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 [[file:../README.org][Options]].
  16. + Brain @ http://localhost:8080
  17. + Homepage @ https://chrishayward.xyz
  18. + Athabasca @ https://login.athabascau.ca/cas/login
  19. + Bookshelf @ https://online.vitalsource.com
  20. #+begin_src emacs-lisp
  21. (use-package dashboard
  22. :custom (dashboard-center-content t)
  23. (dashboard-set-init-info t)
  24. (dashboard-set-file-icons t)
  25. (dashboard-set-heading-icons t)
  26. (dashboard-set-navigator t)
  27. (dashboard-startup-banner 'logo)
  28. (dashboard-projects-backend 'projectile)
  29. (dashboard-items '((projects . 10) (recents . 10) (agenda . 10)))
  30. (dashboard-navigator-buttons
  31. `(((,(all-the-icons-fileicon "brain" :height 1.1 :v-adjust 0.0)
  32. "Brain" "Knowledge base"
  33. (lambda (&rest _) (browse-url "http://localhost:8080"))))
  34. ((,(all-the-icons-material "public" :height 1.1 :v-adjust 0.0)
  35. "Homepage" "Personal website"
  36. (lambda (&rest _) (browse-url "https://chrishayward.xyz"))))
  37. ((,(all-the-icons-faicon "university" :height 1.1 :v-adjust 0.0)
  38. "Athabasca" "Univeristy login"
  39. (lambda (&rest _) (browse-url "https://login.athabascau.ca/cas/login"))))
  40. ((,(all-the-icons-faicon "book" :height 1.1 :v-adjust 0.0)
  41. "Bookshelf" "Vitalsource bookshelf"
  42. (lambda (&rest _) (browse-url "https://online.vitalsource.com"))))))
  43. :config (dashboard-setup-startup-hook))
  44. #+end_src
  45. ** Default buffer
  46. Ensure that the dashboard is the initial buffer.
  47. #+begin_src emacs-lisp
  48. (with-eval-after-load 'dashboard
  49. (setq initial-buffer-choice
  50. (lambda ()
  51. (get-buffer "*dashboard*"))))
  52. #+end_src
  53. ** Keybinding
  54. Quickly navigate to the dashboard with =SPC SPC=.
  55. #+begin_src emacs-lisp
  56. (dotfiles/leader
  57. "SPC" '((lambda ()
  58. (interactive)
  59. (switch-to-buffer "*dashboard*"))
  60. :which-key "Dashboard"))
  61. #+end_src