Skip to content

Commit

Permalink
Add dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
chuxubank committed Apr 4, 2024
1 parent fb3e8dd commit 96a9feb
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cats/+daemon.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@

(add-hook 'server-after-make-frame-hook #'cat-client-frame-config)

(when (package-installed-p 'dashboard)
(defun cat-daemon-init-buffer ()
(get-buffer-create dashboard-buffer-name))
(setq initial-buffer-choice #'cat-daemon-init-buffer))

(defun cat-daemon-preload ()
(cat-benchmark 'beg "daemon preload.")
(require 'org)
Expand Down
29 changes: 29 additions & 0 deletions cats/+dashboard.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
;; -*- lexical-binding: t; -*-

(defconst cat-banner-file (concat cat-etc-dir "meow.svg"))

(defun cat-download-banner ()
(interactive)
(url-copy-file "https://github.com/meow-edit/meow/raw/master/meow.svg" cat-banner-file))

(use-package dashboard
:demand t
:init
(unless (file-exists-p cat-banner-file)
(cat-download-banner))
:custom
(dashboard-items '((projects . 5)
(recents . 5)
(bookmarks . 5)
(registers . 5)))
(dashboard-banner-logo-title "Cat Emacs")
(dashboard-startup-banner cat-banner-file)
(dashboard-center-content t)
(dashboard-vertically-center-content t)
(dashboard-show-shortcuts nil)
(dashboard-display-icons-p t)
(dashboard-set-heading-icons t)
(dashboard-set-file-icons t)
(dashboard-icon-type 'nerd-icons)
:config
(dashboard-setup-startup-hook))
1 change: 1 addition & 0 deletions config.el
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
(cat! "+highlight")
(cat! "+windows")
(cat! "+treemacs")
(cat! "+dashboard")

;;; daemon
(cat! "+daemon")
Expand Down

0 comments on commit 96a9feb

Please sign in to comment.