Customize fringes

Still to think about: changing the `fringe' face.  Do I want it another color?
Do I even need any buffer boundaries?  Hm....
This commit is contained in:
Case Duckworth 2021-04-30 17:36:25 -05:00
parent b723eb988f
commit 74aa9c9e3a
3 changed files with 34 additions and 10 deletions

View File

@ -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)))

12
init.el
View File

@ -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

View File

@ -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