From 74aa9c9e3a7ebc7e142107347b150d1e0adc8065 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 30 Apr 2021 17:36:25 -0500 Subject: Customize fringes Still to think about: changing the `fringe' face. Do I want it another color? Do I even need any buffer boundaries? Hm.... --- early-init.el | 6 +++++- init.el | 12 +++--------- lisp/acdw.el | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/early-init.el b/early-init.el index e9d7de0..25bc58c 100644 --- a/early-init.el +++ b/early-init.el @@ -73,7 +73,8 @@ (funcall (car mode) -1))))) (add-function :after after-focus-change-function - (defun hook--setup-fonts () + (defun acdw/first-frame-setup () + ;; fonts (require 'acdw-fonts) (setq acdw-fonts/monospace (pcase acdw/system (:home "DejaVu Sans Mono") @@ -90,6 +91,9 @@ "Noto Color Emoji" "Apple Color Emoji" "Symbola") + ;; fringes + (acdw/setup-fringes) + ;; only run this once (remove-function after-focus-change-function 'hook--setup-fonts))) diff --git a/init.el b/init.el index 38adf44..d6e8fc8 100644 --- a/init.el +++ b/init.el @@ -63,12 +63,6 @@ ;; see also: `acdw' and friends. Functions here aren't big enough, or they're ;; too tightly bound to stuff here, to be placed in `acdw'. -;; Regular modes: `text-mode' and `prog-mode' -(defun acdw/fringe-setup () - (setq-local indicate-empty-lines t - indicate-buffer-boundaries '((top . right) - (bottom . right)))) - ;; Flash the mode line (defun flash-mode-line () "Flash the modeline as a bell." @@ -404,7 +398,7 @@ (:hook show-paren-mode electric-pair-local-mode - acdw/fringe-setup) + acdw/setup-fringes) (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)) @@ -513,7 +507,7 @@ (setup text (:hook turn-on-auto-fill - acdw/fringe-setup)) + acdw/setup-fringes)) (setup uniquify (:option uniquify-buffer-name-style 'forward @@ -848,7 +842,7 @@ if ripgrep is installed, otherwise `consult-grep'." (if olivetti-mode (setq-local indicate-empty-lines nil indicate-buffer-boundaries nil) - (acdw/fringe-setup))))) + (acdw/setup-fringes))))) (setup (:straight (orderless :host github diff --git a/lisp/acdw.el b/lisp/acdw.el index dcb3967..dac91b7 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -206,6 +206,32 @@ Prompt only if there are unsaved changes." (run-at-time sunset-time (* 60 60 24) sunset-command) (run-at-time "12:00am" (* 60 60 24) sunset-command))) +(defun acdw/setup-fringes () + "Set up fringes how I likes 'em." + (define-fringe-bitmap 'left-curly-arrow + [#b01100000 + #b00110000 + #b00011000 + #b00001100] + 4 8 'center) + (define-fringe-bitmap 'right-curly-arrow + [#b00000011 + #b00000110 + #b00001100 + #b00011000] + 4 8 'center) + (define-fringe-bitmap 'left-arrow + [#b01100000 + #b01010000] + 2 8 '(top t)) + (define-fringe-bitmap 'right-arrow + [#b00000011 + #b00000101] + 2 8 '(top t)) + (setq-local indicate-empty-lines nil + indicate-buffer-boundaries '((top . right) + (bottom . right)))) + ;;; Keymaps -- cgit 1.4.1-21-gabe81