A shameless extraction of Spacemacs’ startup screen.
- Displays an awesome Emacs banner!
- Recent files
- Bookmarks list
- Recent projectile projects list (Depends on `projectile` package)
You will need the following packages which are all available on Melpa:
- page-break-lines - https://github.com/purcell/page-break-lines
- (optional) projectile - https://github.com/bbatsov/projectile
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)
You can use any of the following shortcuts inside Dashboard
Shortcut | Function |
---|---|
Tab Or C-i | Next Item |
Shift-Tab | Previous Item |
Return / Mouse Click / C-m | Open |
r | Recent files |
m | Bookmarks |
p | Projects |
- [ ] Center content
- [ ] Integrate Org-mode’s agenda
- [ ] Listing Perspectives
- [ ] More banner options
- [X] Customizing the list of widgets to display
Contributions are very welcome :)