From 3d89edf45c2f32f59771b6c6e14793ae6b2760c6 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 10 Feb 2021 17:35:53 -0600 Subject: Add acdw/reading-mode Currently, it increases the text scale, turns on visual-fill-column-mode and iscroll-mode. --- config.org | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'config.org') diff --git a/config.org b/config.org index 7fc3a59..4c6717f 100644 --- a/config.org +++ b/config.org @@ -1640,10 +1640,25 @@ Display corrections with =completing-read=. #'(lambda () (blackout 'iscroll-mode))) #+end_src -** TODO Reading mode +** Reading mode A custom mode to make reading comfy +#+begin_src emacs-lisp :noweb-ref modes + (define-minor-mode acdw/reading-mode + "Make reading comfier." + :lighter " Read" ; later: book emoji + (if acdw/reading-mode + (progn ;; turn on + (text-scale-increase +1) + (visual-fill-column-mode +1) + (iscroll-mode +1)) + (progn ;; turn off + (text-scale-increase 0) + (visual-fill-column-mode -1) + (iscroll-mode -1)))) +#+end_src + * Programming ** Comments @@ -2078,12 +2093,7 @@ See [[https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/mast #+end_src #+begin_src emacs-lisp :noweb-ref hooks - (defun hook--elfeed-show () - (text-scale-adjust +1) - (visual-fill-column-mode +1) - (iscroll-mode +1)) - - (add-hook 'elfeed-show-mode-hook #'hook--elfeed-show) + (add-hook 'elfeed-show-mode-hook #'acdw/reading-mode) #+end_src #+begin_src emacs-lisp :noweb-ref bindings @@ -2263,6 +2273,10 @@ others. (define-key elpher-mode-map "G" #'elpher-go-current)) #+end_src +#+begin_src emacs-lisp :noweb-ref hooks + (add-hook 'elpher-mode-hook #'acdw/reading-mode) +#+end_src + *** Gemini-mode :package: #+begin_src emacs-lisp :noweb-ref packages -- cgit 1.4.1-21-gabe81