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.

76 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. :when (window-system)
  23. :custom (dashboard-center-content t)
  24. (dashboard-set-init-info t)
  25. (dashboard-set-file-icons t)
  26. (dashboard-set-heading-icons t)
  27. (dashboard-set-navigator t)
  28. (dashboard-startup-banner 'logo)
  29. (dashboard-projects-backend 'projectile)
  30. (dashboard-items '((projects . 10) (recents . 10) (agenda . 10)))
  31. (dashboard-navigator-buttons
  32. `(((,(all-the-icons-fileicon "brain" :height 1.1 :v-adjust 0.0)
  33. "Brain" "Knowledge base"
  34. (lambda (&rest _) (browse-url "http://localhost:8080"))))
  35. ((,(all-the-icons-material "public" :height 1.1 :v-adjust 0.0)
  36. "Homepage" "Personal website"
  37. (lambda (&rest _) (browse-url "https://chrishayward.xyz"))))
  38. ((,(all-the-icons-faicon "university" :height 1.1 :v-adjust 0.0)
  39. "Athabasca" "Univeristy login"
  40. (lambda (&rest _) (browse-url "https://login.athabascau.ca/cas/login"))))
  41. ((,(all-the-icons-faicon "book" :height 1.1 :v-adjust 0.0)
  42. "Bookshelf" "Vitalsource bookshelf"
  43. (lambda (&rest _) (browse-url "https://online.vitalsource.com"))))))
  44. :config (dashboard-setup-startup-hook))
  45. #+end_src
  46. ** Default buffer
  47. Ensure that the dashboard is the initial buffer.
  48. #+begin_src emacs-lisp
  49. (with-eval-after-load 'dashboard
  50. (setq initial-buffer-choice
  51. (lambda ()
  52. (get-buffer "*dashboard*"))))
  53. #+end_src
  54. ** Keybinding
  55. Quickly navigate to the dashboard with =SPC SPC=.
  56. #+begin_src emacs-lisp
  57. (dotfiles/leader
  58. "SPC" '((lambda ()
  59. (interactive)
  60. (switch-to-buffer "*dashboard*"))
  61. :which-key "Dashboard"))
  62. #+end_src