/emacs-dashboard

A shameless extraction of Spacemac's startup screen

Primary LanguageEmacs Lisp

Emacs Dashboard

A shameless extraction of Spacemacs’ startup screen.

Features

  1. Displays an awesome Emacs banner!
  2. Recent files
  3. Bookmarks list
  4. Recent projectile projects list (Depends on `projectile` package)

Screenshot

./screenshot.png

Dependencies

You will need the following packages which are all available on Melpa:

  1. page-break-lines - https://github.com/purcell/page-break-lines
  2. (optional) projectile - https://github.com/bbatsov/projectile

Usage

M-x package-install RET dashboard
(require 'dashboard)
(dashboard-setup-startup-hook)
;; Or if you use use-package
(use-package dashboard
  :config
  (dashboard-setup-startup-hook))

By default, this will show two lists, recent files and bookmarks. One more widget is implemented by Dashboard but it’s made optional because of it’s dependency on a third party application, which is `projects` which shows you the list of known projectile projects.

To customize which widgets are displayed, you can use the following snippet

(setq dashboard-items '((recents  . 5)
                        (bookmarks . 5)
			(projects . 5)))

This will add the recent files, bookmarks and the projects widgets to your dashboard each displaying 5 items.

To add your own custom widget is pretty easy, define your widget’s callback function and add it to `dashboard-items` as such:

(defun dashboard-insert-custom ()
  (insert "Custom text"))
(add-to-list 'dashboard-item-generators  '(custom . dashboard-insert-custom))
(add-to-list 'dashboard-items '(custom) t)

Shortcuts

You can use any of the following shortcuts inside Dashboard

ShortcutFunction
Tab Or C-iNext Item
Shift-TabPrevious Item
Return / Mouse Click / C-mOpen
rRecent files
mBookmarks
pProjects

Wish List

  1. [ ] Center content
  2. [ ] Integrate Org-mode’s agenda
  3. [ ] Listing Perspectives
  4. [ ] More banner options
  5. [X] Customizing the list of widgets to display

Contributions

Contributions are very welcome :)