From c40c07e0b9debab2bf364a7a487e87d135a742fc Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 1 Mar 2021 14:44:43 -0600 Subject: Add custom-file --- init.el | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/init.el b/init.el index 2eef38e..6fc296b 100644 --- a/init.el +++ b/init.el @@ -26,26 +26,42 @@ calendar-location-name "Baton Rouge, LA" calendar-latitude 30.4 calendar-longitude -91.1 - calendar-date-style 'iso) + calendar-date-style 'iso + custom-file (expand-file-name "custom.el" acdw/etc-dir)) ;; Load newer files first (setq-default load-prefer-newer t) -;; Make C-z more useful -(defvar acdw/leader - (let ((map (make-sparse-keymap)) - (c-z (global-key-binding "\C-z"))) - (global-unset-key "\C-z") - (global-set-key "\C-z" map) - (define-key map "\C-z" c-z) - map) - "A leader key for apps and stuff.") +;; No littering +(use-package no-littering + :demand + :init (setq no-littering-etc-directory acdw/etc-dir + no-littering-var-directory acdw/var-dir)) (defun when-unfocused (func &rest args) "Run FUNC with ARGS iff all frames are out of focus." (when (seq-every-p #'null (mapcar #'frame-focus-state (frame-list))) (apply func args))) +(define-minor-mode acdw/reading-mode + "Make reading comfier." + :lighter " Read" + (if acdw/reading-mode + (progn ;; turn on + (text-scale-increase +1) + (display-fill-column-indicator-mode -1) + (dolist (func '(visual-fill-column-mode + iscroll-mode)) + (when (fboundp func) + (funcall func +1)))) + (progn ;; turn off + (text-scale-increase 0) + (display-fill-column-indicator-mode +1) + (dolist (func '(visual-fill-column-mode + iscroll-mode)) + (when (fboundp func) + (funcall func -1)))))) + ;; 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