From b9d9326595619b2441f0319c82a6a70abffe7e6f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 1 Mar 2021 16:57:55 -0600 Subject: Change reading and read-only mode --- init.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 53dc088..5e398fb 100644 --- a/init.el +++ b/init.el @@ -48,20 +48,26 @@ :lighter " Read" (if acdw/reading-mode (progn ;; turn on - (text-scale-increase +1) + ;; (text-scale-increase +1) (display-fill-column-indicator-mode -1) + (setq cursor-type 'hbar) (dolist (func '(visual-fill-column-mode iscroll-mode)) (when (fboundp func) (funcall func +1)))) (progn ;; turn off - (text-scale-increase 0) + ;; (text-scale-increase 0) + (setq cursor-type 'bar) (display-fill-column-indicator-mode +1) (dolist (func '(visual-fill-column-mode iscroll-mode)) (when (fboundp func) (funcall func -1)))))) +(defun hook--read-only-cursor () + (setq cursor-type (if buffer-read-only 'hbar 'bar))) +(add-hook 'read-only-mode-hook #'hook--read-only-cursor) + ;; Dialogs & alerts (setq-default use-dialog-box nil) ; Don't use a dialog box (fset 'yes-or-no-p #'y-or-n-p) -- cgit 1.4.1-21-gabe81