~hristoast/dot-emacs

c8237e84cf9fddcda592831c2058cd674652051a — Hristos N. Triantafillou 8 months ago a8521c1
Add the dashboard package and friends

New knob vars:

EMACS_DASHBOARD_TITLE
EMACS_DASHBOARD_BANNER
EMACS_NO_ALL_THE_ICONS
EMACS_NO_DASHBOARD
2 files changed, 54 insertions(+), 0 deletions(-)

M lib/ui.el
M straight/versions/default.el
M lib/ui.el => lib/ui.el +50 -0
@@ 34,6 34,56 @@
    :config
    (global-diff-hl-mode)))

(unless (getenv "EMACS_NO_DASHBOARD")
  ;; An extensible emacs startup screen showing you what’s most important.
  ;; https://github.com/emacs-dashboard/emacs-dashboard
  (use-package dashboard
    :straight t
    :config
    (dashboard-setup-startup-hook)
    ;; Allow banner customization through an environment variable
    (let ((h/dashboard/banners
           #s(hash-table
              size 5
              test equal
              data
              ("official" official
               "logo" logo
               "1" 1
               "2" 2
               "3" 3)))
          (h/dashboard/default-banner "logo"))
      (setq
       dashboard-banner-logo-title (or (getenv "EMACS_DASHBOARD_TITLE")
                                       "Welcome to Hristos' Emacs")
       dashboard-footer-messages '("Check out: https://mousikofidi.info/"
                                   "Check out: https://openmw.org/"
                                   "Check out: https://soupault.app/"
                                   "Check out: https://sr.ht/"
                                   "Don't forget to smile!"
                                   "Hristos is proud of you!"
                                   "Keep excited and hack on!"
                                   "Pssst, try: M-x fireplace"
                                   "Smile at a stranger today.")
       dashboard-items '((recents  . 10)
                         (bookmarks . 10)
                         (agenda . 10))
       dashboard-set-file-icons t
       dashboard-set-heading-icons t
       dashboard-startup-banner (gethash (or (getenv "EMACS_DASHBOARD_BANNER")
                                             h/dashboard/default-banner)
                                         h/dashboard/banners nil)
       initial-buffer-choice (lambda () (get-buffer "*dashboard*"))))))

(unless (getenv "EMACS_NO_ALL_THE_ICONS")
  (progn
    ;; A utility package to collect various Icon Fonts and propertize them within Emacs.
    ;; https://github.com/domtronn/all-the-icons.el
    (use-package all-the-icons :straight t)
    (use-package all-the-icons-dired
      :straight t
      :hook (dired-mode . all-the-icons-dired-mode))))

;; https://github.com/akreisher/eshell-syntax-highlighting/
(unless (getenv "EMACS_NO_ESHELL_SYNTAX")
  (use-package eshell-syntax-highlighting :straight t :defer t))

M straight/versions/default.el => straight/versions/default.el +4 -0
@@ 1,4 1,6 @@
(("alert" . "7046393272686c7a1a9b3e7f7b1d825d2e5250a6")
 ("all-the-icons-dired" . "fc2dfa1e9eb8bf1c402a675e7089638d702a27a5")
 ("all-the-icons.el" . "19c8708b6ed9463e6c9a3bcce92e7e92d6260008")
 ("blacken" . "784da60033fe3743336d1da0f33239f1bf514266")
 ("clang-format" . "e48ff8ae18dc7ab6118c1f6752deb48cb1fc83ac")
 ("clean-aindent-mode" . "a97bcae8f43a9ff64e95473e4ef0d8bafe829211")


@@ 12,6 14,7 @@
 ("dimmer.el" . "8559fb73a2c96755cb30f560be82191164014b43")
 ("dockerfile-mode" . "58b7380189de21496235382900838aa0db2dcf92")
 ("dtrt-indent" . "4a30d8edac7fbc5936fc07050e3ebfb94f97c1e7")
 ("emacs-dashboard" . "411ff9ff9368f03d09097ad1d395d632fd4d9f40")
 ("emacs-fireplace" . "f6c23e259349922aae25cf2898ba815a7d8f2527")
 ("emacs-fish" . "db257db81058b0b12f788c324c264cc59b9a5bf4")
 ("emacs-gdscript-mode" . "16c631cd6f2f2eeb11730442c9897008e1e10f7a")


@@ 52,6 55,7 @@
 ("nginx-mode" . "a2bab83c2eb233d57d76b236e7c141c2ccc97005")
 ("org" . "2512fd702fca4d17f6042f9bfa252a9367fb9f74")
 ("org-roam" . "b0fd12647b94ba6e3cf82a2a5b1ee7655ac07760")
 ("page-break-lines" . "69caea070379f3324c530e96e06625c3cd097cb9")
 ("pkg-info" . "76ba7415480687d05a4353b27fea2ae02b8d9d61")
 ("rainbow-delimiters" . "f43d48a24602be3ec899345a3326ed0247b960c6")
 ("rainbow-mode" . "949166cc0146bc9fabf74ce70c1c4a097f4cffd4")