aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/config.org
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2021-11-22 06:19:13 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2021-11-22 06:20:05 +0000
commite9825c7131a5162e95affba0b275a392ca2d2aff (patch)
tree41fe5e602ffed75eed7040f4af0a9f54e72cf3e2 /Emacs/.config/emacs/config.org
parent074182ab1884f11832aae2709c374ea8682e0ba3 (diff)
downloaddotfiles-e9825c7131a5162e95affba0b275a392ca2d2aff.tar.gz
dotfiles-e9825c7131a5162e95affba0b275a392ca2d2aff.tar.bz2
dotfiles-e9825c7131a5162e95affba0b275a392ca2d2aff.zip
(Emacs)+olivetti
Check the edit for a description of the package. Just setup a toggle based function to turn on olivetti-mode.
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r--Emacs/.config/emacs/config.org27
1 files changed, 27 insertions, 0 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index 787ca47..209c294 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -1065,6 +1065,33 @@ with colouring and a ton of presentations to choose from.
(evil telephone-line-evil-tag-segment)))
(telephone-line-mode))
#+end_src
+** Olivetti
+Olivetti provides a focus mode for Emacs, which makes it look a bit
+nicer with fringes. I also define =+olivetti-mode= which will
+remember and clear up any window configurations on the frame, then
+when turned off will reinsert them - provides a nice way to quickly
+focus on a buffer.
+#+begin_src emacs-lisp
+(use-package olivetti
+ :init
+ (setq-default olivetti-body-width 0.67)
+ (setq olivetti-style nil)
+ (add-hook 'olivetti-mode-on-hook (proc (interactive) (text-scale-increase 1)))
+ (add-hook 'olivetti-mode-off-hook (proc (interactive) (text-scale-decrease 1)))
+ :config
+ (defun +olivetti-mode ()
+ (interactive)
+ (if (not olivetti-mode)
+ (progn
+ (window-configuration-to-register 1)
+ (delete-other-windows)
+ (olivetti-mode t))
+ (jump-to-register 1)
+ (olivetti-mode 0)))
+ :general
+ (leader
+ "to" #'+olivetti-mode))
+#+end_src
* Small packages
** ISearch
#+begin_src emacs-lisp