zenwriter-mode

Distraction-free writing for Emacs, inspired by iA Writer. Monochromatic color theme with a signature blue cursor, zen writing modes, and visual-line focus dimming.

Dark mode Light mode
Light Dark

Features

Color theme (zenwriter-theme.el)

Zen writing mode (zenwriter-mode.el)

Focus mode


Prerequisites

Font: Maple Mono CN

The theme uses Maple Mono CN by default. Install it before using global-zenwriter-mode.

macOS (Homebrew):

brew install --cask font-maple-mono-cn

Manual download:

Download from Maple Font releases and install the MapleMono-CN-*.ttf files to your system fonts directory.

If you prefer a different font, set zenwriter-font-family before enabling the mode.

Installation

straight.el + use-package

(use-package zenwriter-mode
  :straight (zenwriter-mode
    :type git
    :host github
    :repo "jhou1/zenwriter"
    :files ("*.el"))
  :commands (zenwriter-mode global-zenwriter-mode
             zenwriter-focus-mode global-zenwriter-focus-mode)
  :init
  (add-to-list 'custom-theme-load-path
               (expand-file-name "straight/repos/zenwriter-mode"
                                 user-emacs-directory)))

Manual

git clone https://github.com/jhou1/zenwriter /path/to/zenwriter-mode

Add to your init.el or .emacs:

(add-to-list 'custom-theme-load-path "/path/to/zenwriter-mode")
(add-to-list 'load-path "/path/to/zenwriter-mode")
(require 'zenwriter-mode)

Usage

;; Just the color theme
(load-theme 'zenwriter t)

;; Zen mode in the current buffer
(zenwriter-mode 1)

;; Full zen experience — all buffers, theme, font, hidden chrome
(global-zenwriter-mode 1)

;; Focus mode — dim everything except the current line
(global-zenwriter-focus-mode 1)

Toggle off with the same commands (or pass -1). global-zenwriter-mode restores your previous themes and UI state when disabled.

Customization

VariableDefaultDescription
zenwriter-font-family"Maple Mono CN"Font set by global-zenwriter-mode
zenwriter-line-spacing8Extra line spacing in pixels
zenwriter-body-width100Text body width in columns (olivetti)
zenwriter-focus-dimmed-colornil (auto)Foreground color for dimmed text; when nil, reads from font-lock-comment-face

Example:

(setq zenwriter-font-family "Iosevka")
(setq zenwriter-body-width 90)
(setq zenwriter-line-spacing 6)

Optional dependencies