GithubHelp home page GithubHelp logo

standardgalactic / emacs-dashboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emacs-dashboard/emacs-dashboard

0.0 2.0 0.0 1008 KB

An extensible emacs dashboard

License: GNU General Public License v3.0

Emacs Lisp 97.93% Makefile 1.06% Batchfile 0.51% Shell 0.51%

emacs-dashboard's Introduction

https://github.com/emacs-dashboard/emacs-dashboard/workflows/CI/badge.svg https://melpa.org/packages/dashboard-badge.svg https://stable.melpa.org/packages/dashboard-badge.svg

Emacs Dashboard

An extensible emacs startup screen showing you what’s most important.

Features

  1. Displays an awesome Emacs banner!
  2. Recent files
  3. Bookmarks list
  4. Recent projects list (Depends on `projectile` or `project.el` package)
  5. Org mode agenda
  6. Register list

Screenshot

./etc/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
  3. (optional) all-the-icons - https://github.com/domtronn/all-the-icons.el

Usage

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

By default, this will show three lists, recent files and bookmarks and org-agenda items.

The widget “projects”, which shows a list of recent projects, is not enabled by default since it depends on packages that might not be available. To activate the widget, set the variable dashboard-projects-backend to either =’projectile= (projectile, available from melpa) or =’project-el= (project.el, available from GNU elpa), then add an entry like (projects . 5) to the variable dashboard-items.

Emacs Daemon

In addition to the above, configure initial-buffer-choice to show Dashboard in frames created with emacsclient -c as follows:

(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))

Configuration

To update the banner or banner title

;; Set the title
(setq dashboard-banner-logo-title "Welcome to Emacs Dashboard")
;; Set the banner
(setq dashboard-startup-banner [VALUE])
;; Value can be
;; 'official which displays the official emacs logo
;; 'logo which displays an alternative emacs logo
;; 1, 2 or 3 which displays one of the text banners
;; "path/to/your/image.png" or "path/to/your/text.txt" which displays whatever image/text you would prefer

;; Content is not centered by default. To center, set
(setq dashboard-center-content t)

;; To disable shortcut "jump" indicators for each section, set
(setq dashboard-show-shortcuts nil)

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

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

This will add the recent files, bookmarks, projects, org-agenda and registers 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 (list-size)
  (insert "Custom text"))
(add-to-list 'dashboard-item-generators  '(custom . dashboard-insert-custom))
(add-to-list 'dashboard-items '(custom) t)

To add icons to the widget headings and their items:

(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)

To modify heading icons with another icon from all-the-icons octicons:

(dashboard-modify-heading-icons '((recents . "file-text")
                                  (bookmarks . "book")))

To show navigator below the banner:

(setq dashboard-set-navigator t)

To customize the buttons of the navigator like this:

;; Format: "(icon title help action face prefix suffix)"
(setq dashboard-navigator-buttons
      `(;; line1
        ((,(all-the-icons-octicon "mark-github" :height 1.1 :v-adjust 0.0)
         "Homepage"
         "Browse homepage"
         (lambda (&rest _) (browse-url "homepage")))
        ("" "Star" "Show stars" (lambda (&rest _) (show-stars)) warning)
        ("?" "" "?/h" #'show-help nil "<" ">"))
         ;; line 2
        ((,(all-the-icons-faicon "linkedin" :height 1.1 :v-adjust 0.0)
          "Linkedin"
          ""
          (lambda (&rest _) (browse-url "homepage")))
         ("" nil "Show flags" (lambda (&rest _) (message "flag")) error))))

To show info about the packages loaded and the init time:

(setq dashboard-set-init-info t)

Also, the message can be customized like this:

(setq dashboard-init-info "This is an init message!")

A randomly selected footnote will be displayed. To disable it:

(setq dashboard-set-footer nil)

To customize it and customize its icon;

(setq dashboard-footer-messages '("Dashboard is pretty cool!"))
(setq dashboard-footer-icon (all-the-icons-octicon "dashboard"
                                                   :height 1.1
                                                   :v-adjust -0.05
                                                   :face 'font-lock-keyword-face))

To use it with counsel-projectile or persp-projectile

(setq dashboard-projects-switch-function 'counsel-projectile-switch-project-by-name)

Or

(setq dashboard-projects-switch-function 'projectile-persp-switch-project)

Org mode’s agenda

To display today’s agenda items on the dashboard, add agenda to dashboard-items:

(add-to-list 'dashboard-items '(agenda) t)

To show agenda for the upcoming seven days set the variable dashboard-week-agenda to t.

(setq dashboard-week-agenda t)

Note that setting list-size for the agenda list is intentionally ignored; all agenda items for the current day will be displayed.

To customize which categories from the agenda items should be visible in the dashboard set the dashboard-org-agenda-categories to the list of categories you need.

(setq dashboard-org-agenda-categories '("Tasks" "Appointments"))

By default org-agenda entries are filter by time, only showing those task with DEADLINE or SCHEDULE-TIME. To show all agenda entries (except DONE)

(setq dashboard-filter-agenda-entry 'dashboard-no-filter-agenda)

To have an extra filter, MATCH parameter is exposed as dashboard-match-agenda-entry variable, by default is nil

‘MATCH’ is a tags/property/TODO match. Org iterates only matched headlines. Org iterates over all headlines when MATCH is nil or t.

See Org Manual for more information.

Once the agenda appears in the dashboard, org-agenda-files stay open. With (setq dashboard-agenda-release-buffers t) the org files are close. Note that this could slow down the dashboard buffer refreshment.

Faces

It is possible to customize Dashboard’s appearance using the following faces:

dashboard-banner-logo-title
Highlights the banner title.
dashboard-text-banner
Highlights text banners.
dashboard-heading
Highlights widget headings.
dashboard-items-face
Highlights widget items.

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
aOrg-Mode Agenda
eRegisters
gRefresh contents
{Previous section
}Next section

Wish List

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

Contributions

To contribute your changes to this package, please do the following:

  1. Fork the repo
  2. Clone a local copy
  3. Make your changes
  4. Push and create your PR

When working on this package, it’s typical to uninstall dashboard, develop your changes and then install this as “development version”.

This is accomplished with the following steps:

# In emacs:
M-x package-delete dashboard-<version> RET
make build
make install

Prerequisites

emacs-dashboard's People

Contributors

bolt64 avatar eigengrau avatar ema2159 avatar fieryzig avatar gergelypolonkai avatar gexplorer avatar jcs090218 avatar jesusmtnez avatar jkdufair avatar kahole avatar karatasfurkan avatar konkrotte avatar luis-henriquez-perez avatar mikethegreat avatar mtreca avatar nathanvy avatar pleh2 avatar purcell avatar qharlie avatar rakanalh avatar ricardoricho avatar rudi avatar seagle0128 avatar sidhartharya avatar syohex avatar toncherami avatar vonfry avatar winny- avatar zevlg avatar zjp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.