diff options
author | Case Duckworth | 2021-02-10 17:35:53 -0600 |
---|---|---|
committer | Case Duckworth | 2021-02-10 17:35:53 -0600 |
commit | 3d89edf45c2f32f59771b6c6e14793ae6b2760c6 (patch) | |
tree | a297e3b63c66ebe851e8e6498ad1184d5954753e | |
parent | Rebind M-= to `count-words' (diff) | |
download | emacs-3d89edf45c2f32f59771b6c6e14793ae6b2760c6.tar.gz emacs-3d89edf45c2f32f59771b6c6e14793ae6b2760c6.zip |
Add acdw/reading-mode
Currently, it increases the text scale, turns on visual-fill-column-mode and iscroll-mode.
-rw-r--r-- | config.org | 28 |
1 files changed, 21 insertions, 7 deletions
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=. | |||
1640 | #'(lambda () (blackout 'iscroll-mode))) | 1640 | #'(lambda () (blackout 'iscroll-mode))) |
1641 | #+end_src | 1641 | #+end_src |
1642 | 1642 | ||
1643 | ** TODO Reading mode | 1643 | ** Reading mode |
1644 | 1644 | ||
1645 | A custom mode to make reading comfy | 1645 | A custom mode to make reading comfy |
1646 | 1646 | ||
1647 | #+begin_src emacs-lisp :noweb-ref modes | ||
1648 | (define-minor-mode acdw/reading-mode | ||
1649 | "Make reading comfier." | ||
1650 | :lighter " Read" ; later: book emoji | ||
1651 | (if acdw/reading-mode | ||
1652 | (progn ;; turn on | ||
1653 | (text-scale-increase +1) | ||
1654 | (visual-fill-column-mode +1) | ||
1655 | (iscroll-mode +1)) | ||
1656 | (progn ;; turn off | ||
1657 | (text-scale-increase 0) | ||
1658 | (visual-fill-column-mode -1) | ||
1659 | (iscroll-mode -1)))) | ||
1660 | #+end_src | ||
1661 | |||
1647 | * Programming | 1662 | * Programming |
1648 | 1663 | ||
1649 | ** Comments | 1664 | ** Comments |
@@ -2078,12 +2093,7 @@ See [[https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/mast | |||
2078 | #+end_src | 2093 | #+end_src |
2079 | 2094 | ||
2080 | #+begin_src emacs-lisp :noweb-ref hooks | 2095 | #+begin_src emacs-lisp :noweb-ref hooks |
2081 | (defun hook--elfeed-show () | 2096 | (add-hook 'elfeed-show-mode-hook #'acdw/reading-mode) |
2082 | (text-scale-adjust +1) | ||
2083 | (visual-fill-column-mode +1) | ||
2084 | (iscroll-mode +1)) | ||
2085 | |||
2086 | (add-hook 'elfeed-show-mode-hook #'hook--elfeed-show) | ||
2087 | #+end_src | 2097 | #+end_src |
2088 | 2098 | ||
2089 | #+begin_src emacs-lisp :noweb-ref bindings | 2099 | #+begin_src emacs-lisp :noweb-ref bindings |
@@ -2263,6 +2273,10 @@ others. | |||
2263 | (define-key elpher-mode-map "G" #'elpher-go-current)) | 2273 | (define-key elpher-mode-map "G" #'elpher-go-current)) |
2264 | #+end_src | 2274 | #+end_src |
2265 | 2275 | ||
2276 | #+begin_src emacs-lisp :noweb-ref hooks | ||
2277 | (add-hook 'elpher-mode-hook #'acdw/reading-mode) | ||
2278 | #+end_src | ||
2279 | |||
2266 | *** Gemini-mode :package: | 2280 | *** Gemini-mode :package: |
2267 | 2281 | ||
2268 | #+begin_src emacs-lisp :noweb-ref packages | 2282 | #+begin_src emacs-lisp :noweb-ref packages |