about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-30 17:36:25 -0500
committerCase Duckworth2021-04-30 17:36:25 -0500
commit74aa9c9e3a7ebc7e142107347b150d1e0adc8065 (patch)
tree9eb2a8fbb6e434041e2c44d4af79d97c891900ce
parentMove emoji font configuration to the initial frame setup function (diff)
downloademacs-74aa9c9e3a7ebc7e142107347b150d1e0adc8065.tar.gz
emacs-74aa9c9e3a7ebc7e142107347b150d1e0adc8065.zip
Customize fringes
Still to think about: changing the `fringe' face.  Do I want it another color?
Do I even need any buffer boundaries?  Hm....
-rw-r--r--early-init.el6
-rw-r--r--init.el12
-rw-r--r--lisp/acdw.el26
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 @@
73 (funcall (car mode) -1))))) 73 (funcall (car mode) -1)))))
74 74
75(add-function :after after-focus-change-function 75(add-function :after after-focus-change-function
76 (defun hook--setup-fonts () 76 (defun acdw/first-frame-setup ()
77 ;; fonts
77 (require 'acdw-fonts) 78 (require 'acdw-fonts)
78 (setq acdw-fonts/monospace (pcase acdw/system 79 (setq acdw-fonts/monospace (pcase acdw/system
79 (:home "DejaVu Sans Mono") 80 (:home "DejaVu Sans Mono")
@@ -90,6 +91,9 @@
90 "Noto Color Emoji" 91 "Noto Color Emoji"
91 "Apple Color Emoji" 92 "Apple Color Emoji"
92 "Symbola") 93 "Symbola")
94 ;; fringes
95 (acdw/setup-fringes)
96 ;; only run this once
93 (remove-function after-focus-change-function 97 (remove-function after-focus-change-function
94 'hook--setup-fonts))) 98 'hook--setup-fonts)))
95 99
diff --git a/init.el b/init.el index 38adf44..d6e8fc8 100644 --- a/init.el +++ b/init.el
@@ -63,12 +63,6 @@
63;; see also: `acdw' and friends. Functions here aren't big enough, or they're 63;; see also: `acdw' and friends. Functions here aren't big enough, or they're
64;; too tightly bound to stuff here, to be placed in `acdw'. 64;; too tightly bound to stuff here, to be placed in `acdw'.
65 65
66;; Regular modes: `text-mode' and `prog-mode'
67(defun acdw/fringe-setup ()
68 (setq-local indicate-empty-lines t
69 indicate-buffer-boundaries '((top . right)
70 (bottom . right))))
71
72;; Flash the mode line 66;; Flash the mode line
73(defun flash-mode-line () 67(defun flash-mode-line ()
74 "Flash the modeline as a bell." 68 "Flash the modeline as a bell."
@@ -404,7 +398,7 @@
404 398
405 (:hook show-paren-mode 399 (:hook show-paren-mode
406 electric-pair-local-mode 400 electric-pair-local-mode
407 acdw/fringe-setup) 401 acdw/setup-fringes)
408 402
409 (add-hook 'after-save-hook 403 (add-hook 'after-save-hook
410 #'executable-make-buffer-file-executable-if-script-p)) 404 #'executable-make-buffer-file-executable-if-script-p))
@@ -513,7 +507,7 @@
513 507
514(setup text 508(setup text
515 (:hook turn-on-auto-fill 509 (:hook turn-on-auto-fill
516 acdw/fringe-setup)) 510 acdw/setup-fringes))
517 511
518(setup uniquify 512(setup uniquify
519 (:option uniquify-buffer-name-style 'forward 513 (:option uniquify-buffer-name-style 'forward
@@ -848,7 +842,7 @@ if ripgrep is installed, otherwise `consult-grep'."
848 (if olivetti-mode 842 (if olivetti-mode
849 (setq-local indicate-empty-lines nil 843 (setq-local indicate-empty-lines nil
850 indicate-buffer-boundaries nil) 844 indicate-buffer-boundaries nil)
851 (acdw/fringe-setup))))) 845 (acdw/setup-fringes)))))
852 846
853(setup (:straight (orderless 847(setup (:straight (orderless
854 :host github 848 :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."
206 (run-at-time sunset-time (* 60 60 24) sunset-command) 206 (run-at-time sunset-time (* 60 60 24) sunset-command)
207 (run-at-time "12:00am" (* 60 60 24) sunset-command))) 207 (run-at-time "12:00am" (* 60 60 24) sunset-command)))
208 208
209(defun acdw/setup-fringes ()
210 "Set up fringes how I likes 'em."
211 (define-fringe-bitmap 'left-curly-arrow
212 [#b01100000
213 #b00110000
214 #b00011000
215 #b00001100]
216 4 8 'center)
217 (define-fringe-bitmap 'right-curly-arrow
218 [#b00000011
219 #b00000110
220 #b00001100
221 #b00011000]
222 4 8 'center)
223 (define-fringe-bitmap 'left-arrow
224 [#b01100000
225 #b01010000]
226 2 8 '(top t))
227 (define-fringe-bitmap 'right-arrow
228 [#b00000011
229 #b00000101]
230 2 8 '(top t))
231 (setq-local indicate-empty-lines nil
232 indicate-buffer-boundaries '((top . right)
233 (bottom . right))))
234
209 235
210;;; Keymaps 236;;; Keymaps
211 237