Add :ui zen module

This, combined with the new ':tools (lookup +dictionary)' feature will
eventually replace the ':app write' module.
This commit is contained in:
Henrik Lissner 2019-12-20 00:44:58 -05:00
parent 7742813a06
commit de63dd50ef
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 49 additions and 0 deletions

View file

@ -275,3 +275,4 @@ Aesthetic modules that affect the Emacs interface or user experience.
+ vi-tilde-fringe - TODO + vi-tilde-fringe - TODO
+ [[file:../modules/ui/window-select/README.org][window-select]] =+switch-window +numbers= - TODO + [[file:../modules/ui/window-select/README.org][window-select]] =+switch-window +numbers= - TODO
+ [[file:../modules/ui/workspaces/README.org][workspaces]] - Isolated workspaces + [[file:../modules/ui/workspaces/README.org][workspaces]] - Isolated workspaces
+ [[file:../modules/ui/zen/README.org][zen]] - Distraction-free coding (or writing)

View file

@ -42,6 +42,7 @@
vi-tilde-fringe ; fringe tildes to mark beyond EOB vi-tilde-fringe ; fringe tildes to mark beyond EOB
window-select ; visually switch windows window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor :editor
(evil +everywhere); come to the dark side, we have cookies (evil +everywhere); come to the dark side, we have cookies

42
modules/ui/zen/config.el Normal file
View file

@ -0,0 +1,42 @@
;;; ui/zen/config.el -*- lexical-binding: t; -*-
(defvar +zen-mixed-pitch-modes '(markdown-mode org-mode)
"What major-modes to enable `mixed-pitch-mode' in with `writeroom-mode'.")
;;
;;; Packages
(after! writeroom-mode
(setq writeroom-fullscreen-effect nil
writeroom-maximize-window nil)
;; Adjust margins when text size is changed
(advice-add #'text-scale-adjust :after #'visual-fill-column-adjust))
(use-package! mixed-pitch
:hook (writeroom-mode . +zen-enable-mixed-pitch-mode-h)
:config
(defun +zen-enable-mixed-pitch-mode-h ()
"Enable `mixed-pitch-mode' when in `+zen-mixed-pitch-modes'."
(when (apply #'derived-mode-p +zen-mixed-pitch-modes)
(mixed-pitch-mode (if writeroom-mode +1 -1))))
(pushnew! mixed-pitch-fixed-pitch-faces
'org-date
'org-special-keyword
'org-property-value
'org-ref-cite-face
'org-tag
'org-todo-keyword-todo
'org-todo-keyword-habt
'org-todo-keyword-done
'org-todo-keyword-wait
'org-todo-keyword-kill
'org-todo-keyword-outd
'org-todo
'org-indent
'font-lock-comment-face
'line-number
'line-number-current-line))

View file

@ -0,0 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; ui/zen/packages.el
(package! writeroom-mode)
(package! mixed-pitch)