From 496951513d7ab35c43e6591d3d967c561a40de2c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 5 Oct 2021 08:34:24 -0500 Subject: Customize random stuff --- init.el | 69 +++++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/init.el b/init.el index 106393d..2a6bbcb 100644 --- a/init.el +++ b/init.el @@ -681,7 +681,7 @@ specific to most general, they are these: (:option mouse-1-click-follows-link t)) (setup mouse-avoidance - (mouse-avoidance-mode 'exile)) + (mouse-avoidance-mode 'banish)) (setup page (:option page-delimiter @@ -1222,8 +1222,8 @@ specific to most general, they are these: (crux-reopen-as-root-mode +1)) (setup (:straight-if (define-repeat-map - :host nil - :repo "https://tildegit.org/acdw/define-repeat-map.el") + :host nil + :repo "https://tildegit.org/acdw/define-repeat-map.el") (acdw/system :home)) (require 'define-repeat-map ; just for me @@ -1746,7 +1746,7 @@ browser defined in `browse-url-secondary-browser-function'." (:option modus-themes-slanted-constructs t modus-themes-bold-constructs t modus-themes-fringes nil - modus-themes-mode-line '(borderless moody) + modus-themes-mode-line '(borderless) modus-themes-region '(bg-only) modus-themes-org-blocks 'gray-background modus-themes-headings '((t . (background))) @@ -1904,7 +1904,7 @@ browser defined in `browse-url-secondary-browser-function'." (:option org-adapt-indentation nil org-agenda-files nil ; only until I set this up org-catch-invisible-edits 'show-and-error - org-clock-clocked-in-display 'frame-title + org-clock-clocked-in-display 'mode-line org-clock-frame-title-format (cons '(t org-mode-line-string) (cons " --- " frame-title-format)) ;;org-clock-string-limit 7 ; gives time and not title @@ -1953,32 +1953,40 @@ browser defined in `browse-url-secondary-browser-function'." (:unbind "C-j" ; org-return-and-maybe-indent "M-j") + + (:local-set unfill-fill-function #'org-fill-paragraph) (with-eval-after-load 'org-export (:option (append org-export-filter-final-output-functions) #'org-export-remove-zero-width-spaces)) - (:hook #'variable-pitch-mode - - ;; This is super ugly because I need to add a function to - ;; `before-save-hook', but only in org-mode buffers. So I make a hook - ;; to make a hook. I'm sure there's a better way to do this. - (defun org-mode@fix-blank-lines-on-save () - (add-hook 'before-save-hook - (defun acdw-org/fix-blank-lines-in-buffer () - (acdw-org/fix-blank-lines t)) - 0 :local)) - - (defun org-mode@wc-stupid () - (unless (and wc-mode - (> 0 (+ (or wc-orig-words 0) - (or wc-words-delta 0))))) - (setq-local - wc-count-words-function - (lambda (start end) "Count words stupidly with a limit." - (acdw-org/count-words-stupidly start - end - 999))))) + (:hook ;; #'variable-pitch-mode + + ;; (defun org-mode@before-save@fill-buffer () + ;; (add-hook 'before-save-hook + ;; (defun before-save@fill-buffer () + ;; (fill-region (point-min) (point-max))) + ;; nil :local)) + + ;; This is super ugly because I need to add a function to + ;; `before-save-hook', but only in org-mode buffers. So I make a hook + ;; to make a hook. I'm sure there's a better way to do this. + (defun org-mode@fix-blank-lines-on-save () + (add-hook 'before-save-hook + (defun acdw-org/fix-blank-lines-in-buffer () + (acdw-org/fix-blank-lines t)) + 0 :local)) + + (defun org-mode@wc-stupid () + (unless (and wc-mode + (> 0 (+ (or wc-orig-words 0) + (or wc-words-delta 0))))) + (setq-local + wc-count-words-function + (lambda (start end) "Count words stupidly with a limit." + (acdw-org/count-words-stupidly start + end + 999))))) (with-eval-after-load 'org (org-clock-persistence-insinuate)) @@ -2257,7 +2265,10 @@ the default is \"/\"." (smartparens-strict-mode 1)) (:bind "C-M-q" #'sp-indent-defun - "M-r" #'sp-rewrap-sexp)) + "M-r" #'sp-rewrap-sexp) + (:unbind "M-j" ; sp-join-sexp + )) + (setup (:straight ssh-config-mode) (:file-match (rx "/.ssh/config" eos) (rx "/ssh" (? "d") "_config" eos)) @@ -2341,7 +2352,9 @@ If used with a numeric prefix argument N, N backticks will be inserted." (global-undo-fu-session-mode +1)) -(setup (:straight unfill)) +(setup (:straight (unfill :host github :repo "purcell/unfill" + :fork (:host github :repo "duckwork/unfill"))) + (:global "M-q" #'unfill-toggle)) (setup (:straight (unfocused :host github -- cgit 1.4.1-21-gabe81