2022-03-28 15:03:21 +02:00
|
|
|
#+title: :ui zen
|
|
|
|
#+subtitle: Distraction-free mode for the eternally distracted
|
|
|
|
#+created: December 20, 2019
|
|
|
|
#+since: 21.12.0
|
2021-10-16 01:29:57 +02:00
|
|
|
|
|
|
|
* Description :unfold:
|
2021-03-06 12:08:26 -05:00
|
|
|
This module provides two minor modes that make Emacs into a more comfortable
|
|
|
|
writing or coding environment. Folks familiar with "distraction-free" or "zen"
|
2022-09-26 02:19:42 +08:00
|
|
|
modes from other editors -- or [[doom-package:olivetti]], [[doom-package:sublimity]], and [[doom-package:tabula-rasa]] (Emacs
|
2021-03-06 12:08:26 -05:00
|
|
|
plugins) -- will feel right at home.
|
2019-12-20 01:09:59 -05:00
|
|
|
|
2021-03-06 12:08:26 -05:00
|
|
|
These modes are:
|
2021-10-16 01:29:57 +02:00
|
|
|
- ~mixed-pitch-mode~ ::
|
|
|
|
Which renders (most) text in a variable pitch font (see
|
2021-03-06 12:08:26 -05:00
|
|
|
~doom-variable-pitch-font~). Unlike ~variable-pitch-mode~, this will not
|
|
|
|
affect segments of text that are intended to remain in a fixed pitch font,
|
|
|
|
such as code blocks or ASCII tables.
|
2021-10-16 01:29:57 +02:00
|
|
|
- ~writeroom-mode~ ::
|
|
|
|
Our all-in-one "zen" mode that will:
|
2021-03-06 12:08:26 -05:00
|
|
|
1. Center the current buffer.
|
|
|
|
2. Remove superfluous UI elements (like the modeline).
|
|
|
|
3. Activate ~mixed-pitch-mode~.
|
|
|
|
4. Scale up the buffer's text slightly (see ~+zen-text-scale~).
|
|
|
|
5. And make the window's borders slightly thicker (see
|
|
|
|
~+zen-window-divider-size~).
|
|
|
|
|
2021-10-16 01:29:57 +02:00
|
|
|
** Maintainers
|
|
|
|
- [[doom-user:][@hlissner]]
|
2021-03-06 12:08:26 -05:00
|
|
|
|
2021-10-16 01:29:57 +02:00
|
|
|
[[doom-contrib-maintainer:][Become a maintainer?]]
|
2021-03-06 12:08:26 -05:00
|
|
|
|
2021-10-16 01:29:57 +02:00
|
|
|
** Module flags
|
|
|
|
/This module has no flags./
|
2019-12-20 01:09:59 -05:00
|
|
|
|
2021-10-16 01:29:57 +02:00
|
|
|
** Packages
|
2022-09-26 02:19:42 +08:00
|
|
|
- [[doom-package:mixed-pitch]]
|
|
|
|
- [[doom-package:writeroom-mode]]
|
2019-12-20 01:09:59 -05:00
|
|
|
|
2020-01-09 23:17:49 -05:00
|
|
|
** Hacks
|
2021-03-06 12:08:26 -05:00
|
|
|
+ Doom has disabled all of writeroom-mode's "global" effects
|
|
|
|
(~writeroom-global-effects~ and ~writeroom-maximize-window~ are set to ~nil~),
|
|
|
|
and encapsulated them into the ~+zen/toggle-fullscreen~ command, whereas
|
|
|
|
~+zen/toggle~ will only operate on the current buffer. This way, the user may
|
|
|
|
choose how far-reaching they want its effect to be.
|
|
|
|
+ ~text-scale~ has been advised to adjust ~visual-fill-column~'s margins, so its
|
|
|
|
text won't "squeeze" as you scale it up (or "spill" when scaled down).
|
2020-01-09 23:17:49 -05:00
|
|
|
|
2021-10-16 01:29:57 +02:00
|
|
|
** 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 has no external requirements./
|
|
|
|
|
|
|
|
* Usage
|
|
|
|
This module provides two entry points:
|
|
|
|
|
|
|
|
- ~M-x +zen/toggle~ (on [[kbd:][<leader> t z]]): toggles ~writeroom-mode~ (restricted to
|
|
|
|
the current buffer).
|
|
|
|
- ~M-x +zen/toggle-fullscreen~ (on [[kbd:][<leader> t Z]]): toggles zen mode in
|
|
|
|
full-screen mode (deletes other windows and full screens the Emacs frame).
|
|
|
|
|
|
|
|
Invoke either command again to undo the change.
|
|
|
|
|
|
|
|
* TODO Configuration
|
|
|
|
#+begin_quote
|
2023-09-16 20:19:11 +02:00
|
|
|
This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
|
2021-10-16 01:29:57 +02:00
|
|
|
#+end_quote
|
2019-12-20 01:09:59 -05:00
|
|
|
|
2021-10-16 01:29:57 +02:00
|
|
|
* Troubleshooting
|
|
|
|
/There are no known problems with this module./ [[doom-report:][Report one?]]
|
2019-12-20 01:09:59 -05:00
|
|
|
|
2021-10-16 01:29:57 +02:00
|
|
|
* Frequently asked questions
|
|
|
|
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
|
2019-12-20 01:09:59 -05:00
|
|
|
|
2021-10-16 01:29:57 +02:00
|
|
|
* TODO Appendix
|
|
|
|
#+begin_quote
|
2023-09-16 20:19:11 +02:00
|
|
|
This module has no appendix yet. [[doom-contrib-module:][Write one?]]
|
2021-10-16 01:29:57 +02:00
|
|
|
#+end_quote
|