merge: rewrite-docs

I've omitted docs/*.org from this merge, as there is still work left to
do there, but I am pushing the module docs early so folks can benefit
from the new docs sooner.
This commit is contained in:
Henrik Lissner 2022-08-03 03:23:34 +02:00
commit 1f8bf7accb
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
179 changed files with 13125 additions and 8630 deletions

View file

@ -1,18 +1,10 @@
#+TITLE: ui/doom-dashboard
#+DATE: October 9, 2019
#+SINCE: v1.3
#+STARTUP: inlineimages nofold
# -*- mode: doom-docs-org -*-
#+title: :ui doom-dashboard
#+subtitle: Welcome to your doom
#+created: February 20, 2017
#+since: 2.0.0
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#module-flags][Module Flags]]
- [[#prerequisites][Prerequisites]]
- [[#configuration][Configuration]]
- [[#a-custom-banner][A custom banner]]
- [[#adding-text-to-the-dashboard][Adding text to the dashboard]]
- [[#customizing-faces][Customizing Faces]]
* Description
* Description :unfold:
This module adds a minimalistic, Atom-inspired dashboard to Emacs.
Besides eye candy, the dashboard serves two other purposes:
@ -29,28 +21,53 @@ Besides eye candy, the dashboard serves two other purposes:
of the last open buffer, ~M-x find-file~ will work from the directory I
expect.
** Module Flags
This module provides no flags.
** Maintainers
- [[doom-user:][@hlissner]]
* Prerequisites
This module only requires that ~all-the-icons~'s icon fonts are installed.
[[doom-contrib-maintainer:][Become a maintainer?]]
It should've been installed when you first installed Doom, but ~M-x
all-the-icons-install-fonts~ will install them again.
** Module flags
/This module has no flags./
** Packages
/This module doesn't install any packages./
** Hacks
/No hacks documented for this module./
** TODO Changelog
# This section will be machine generated. Don't edit it by hand.
/This module does not have a changelog yet./
* Installation
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
This module only requires that ~all-the-icons~'s icon fonts are installed, which
should've been installed when you ran ~$ doom install~. Otherwise, use ~M-x
all-the-icons-install-fonts~ to install them.
* Usage
Once this module is enabled, the dashboard will present itself after opening a
fresh instance of Emacs, or after killing all real buffers.
You can forcibly open the dashboard with ~M-x +doom-dashboard/open~.
* TODO Configuration
#+begin_quote
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote
* Configuration
** A custom banner
To use a custom image as your banner, change ~fancy-splash-image~:
#+BEGIN_SRC elisp
#+begin_src emacs-lisp
(setq fancy-splash-image "~/my/banners/image.png")
#+END_SRC
#+end_src
#+begin_quote
Doom will fall back to its ASCII banner in Terminal Emacs. To replace the ASCII
banner, replace the ~doom-dashboard-widget-banner~ function in
~+doom-dashboard-functions~ with a function that inserts your new banner into
the current file.
📌 Doom will fall back to its ASCII banner in Terminal Emacs. To replace the
ASCII banner, replace the ~doom-dashboard-widget-banner~ function in
~+doom-dashboard-functions~ with a function that inserts your new banner
into the current file.
#+end_quote
** Adding text to the dashboard
@ -59,15 +76,16 @@ redraw. Add your own functions to operate on the buffer and potentially add
whatever you like to Doom's splash screen.
#+begin_quote
Keep in mind that inserting text from expensive sources, e.g. your org agenda,
will negate most of Doom's startup benefits.
🚧 Keep in mind that inserting text from expensive sources, e.g. your org
agenda, will negate most of Doom's startup benefits.
#+end_quote
** Customizing Faces
Doom's dashboard defaults to inheriting faces set by the current theme. If you wish
to customize it independently of the theme (or just inherit a different color
from the theme) you can make use of ~custom-set-faces!~ or ~custom-theme-set-faces!~
#+BEGIN_SRC elisp
Doom's dashboard defaults to inheriting faces set by the current theme. If you
wish to customize it independently of the theme (or just inherit a different
color from the theme) you can make use of ~custom-set-faces!~ or
~custom-theme-set-faces!~:
#+begin_src emacs-lisp
(custom-set-faces!
'(doom-dashboard-banner :foreground "red" :background "#000000" :weight bold)
'(doom-dashboard-footer :inherit font-lock-constant-face)
@ -75,9 +93,10 @@ from the theme) you can make use of ~custom-set-faces!~ or ~custom-theme-set-fa
'(doom-dashboard-loaded :inherit font-lock-warning-face)
'(doom-dashboard-menu-desc :inherit font-lock-string-face)
'(doom-dashboard-menu-title :inherit font-lock-function-name-face))
#+END_SRC
#+end_src
or for a per-theme setting
#+BEGIN_SRC elisp
#+begin_src emacs-lisp
(custom-theme-set-faces! 'doom-tomorrow-night
'(doom-dashboard-banner :foreground "red" :background "#000000" :weight bold)
'(doom-dashboard-footer :inherit font-lock-constant-face)
@ -85,4 +104,15 @@ or for a per-theme setting
'(doom-dashboard-loaded :inherit font-lock-warning-face)
'(doom-dashboard-menu-desc :inherit font-lock-string-face)
'(doom-dashboard-menu-title :inherit font-lock-function-name-face))
#+END_SRC
#+end_src
* Troubleshooting
/There are no known problems with this module./ [[doom-report:][Report one?]]
* Frequently asked questions
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
* TODO Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote

View file

@ -172,7 +172,7 @@ PLIST can have the following properties:
;;; Major mode
(define-derived-mode +doom-dashboard-mode special-mode
(format "DOOM v%s" doom-version)
(format "DOOM v%s" doom-core-version)
"Major mode for the DOOM dashboard buffer."
:syntax-table nil
:abbrev-table nil
@ -512,7 +512,11 @@ What it is set to is controlled by `+doom-dashboard-pwd-policy'."
(defun doom-dashboard-widget-footer ()
(insert
"\n"
(+doom-dashboard--center
+doom-dashboard--width
(propertize (concat "DOOM CORE: " doom-core-version " MODULES: " doom-version)
'face 'font-lock-doc-face))
"\n\n"
(+doom-dashboard--center
(- +doom-dashboard--width 2)
(with-temp-buffer
@ -521,5 +525,6 @@ What it is set to is controlled by `+doom-dashboard-pwd-policy'."
'action (lambda (_) (browse-url "https://github.com/hlissner/doom-emacs"))
'follow-link t
'help-echo "Open Doom Emacs github page")
(buffer-string)))
"\n"))