2024-11-13 02:28:49 +00:00
|
|
|
|
;;; Everything related to the look of Emacs
|
|
|
|
|
|
2025-01-04 19:17:01 +00:00
|
|
|
|
;;(add-to-list 'default-frame-alist '(background-color . "snow"))
|
2024-11-13 02:28:49 +00:00
|
|
|
|
|
|
|
|
|
;;;; Lin
|
|
|
|
|
;; Read the lin manual: <https://protesilaos.com/emacs/lin>.
|
|
|
|
|
(use-package lin
|
|
|
|
|
:ensure t
|
2024-12-10 10:35:25 +00:00
|
|
|
|
:hook (elpaca-after-init . lin-global-mode) ; applies to all `lin-mode-hooks'
|
2024-11-13 02:28:49 +00:00
|
|
|
|
:config
|
|
|
|
|
(setopt lin-face 'lin-cyan))
|
|
|
|
|
|
2024-11-14 16:38:27 +00:00
|
|
|
|
;;;; Rainbow mode for colour previewing (rainbow-mode.el)
|
|
|
|
|
(use-package rainbow-mode
|
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(setq rainbow-ansi-colors nil)
|
|
|
|
|
(setq rainbow-x-colors nil)
|
|
|
|
|
|
|
|
|
|
(defun prot/rainbow-mode-in-themes ()
|
|
|
|
|
(when-let* ((file (buffer-file-name))
|
|
|
|
|
((derived-mode-p 'emacs-lisp-mode))
|
|
|
|
|
((string-match-p "-theme" file)))
|
|
|
|
|
(rainbow-mode 1)))
|
|
|
|
|
:bind ( :map ctl-x-x-map
|
|
|
|
|
("c" . rainbow-mode)) ; C-x x c
|
|
|
|
|
:hook (emacs-lisp-mode . prot/rainbow-mode-in-themes))
|
|
|
|
|
|
2024-11-13 02:28:49 +00:00
|
|
|
|
;;; Cursor appearance (cursory)
|
|
|
|
|
;; Read the manual: <https://protesilaos.com/emacs/cursory>.
|
|
|
|
|
(use-package cursory
|
|
|
|
|
:ensure t
|
|
|
|
|
:demand t
|
|
|
|
|
:if (display-graphic-p)
|
|
|
|
|
:config
|
|
|
|
|
(setq cursory-presets
|
|
|
|
|
'((box
|
|
|
|
|
:blink-cursor-interval 1.2)
|
|
|
|
|
(box-no-blink
|
|
|
|
|
:blink-cursor-mode -1)
|
|
|
|
|
(bar
|
|
|
|
|
:cursor-type (bar . 2)
|
|
|
|
|
:blink-cursor-interval 0.8)
|
|
|
|
|
(bar-no-other-window
|
|
|
|
|
:inherit bar
|
|
|
|
|
:cursor-in-non-selected-windows nil)
|
|
|
|
|
(bar-no-blink
|
|
|
|
|
:cursor-type (bar . 2)
|
|
|
|
|
:blink-cursor-mode -1)
|
|
|
|
|
(underscore
|
|
|
|
|
:cursor-type (hbar . 3)
|
|
|
|
|
:blink-cursor-interval 0.3
|
|
|
|
|
:blink-cursor-blinks 50)
|
|
|
|
|
(underscore-no-other-window
|
|
|
|
|
:inherit underscore
|
|
|
|
|
:cursor-in-non-selected-windows nil)
|
|
|
|
|
(underscore-thick
|
|
|
|
|
:cursor-type (hbar . 8)
|
|
|
|
|
:blink-cursor-interval 0.3
|
|
|
|
|
:blink-cursor-blinks 50
|
|
|
|
|
:cursor-in-non-selected-windows (hbar . 3))
|
|
|
|
|
(underscore-thick-no-blink
|
|
|
|
|
:blink-cursor-mode -1
|
|
|
|
|
:cursor-type (hbar . 8)
|
|
|
|
|
:cursor-in-non-selected-windows (hbar . 3))
|
|
|
|
|
(t ; the default values
|
|
|
|
|
:cursor-type box
|
|
|
|
|
:cursor-in-non-selected-windows hollow
|
|
|
|
|
:blink-cursor-mode 1
|
2024-12-31 20:51:51 +00:00
|
|
|
|
:blink-cursor-blinks 5
|
2024-11-13 02:28:49 +00:00
|
|
|
|
:blink-cursor-interval 0.2
|
|
|
|
|
:blink-cursor-delay 0.2)))
|
|
|
|
|
|
|
|
|
|
;; I am using the default values of `cursory-latest-state-file'.
|
|
|
|
|
|
|
|
|
|
;; Set last preset or fall back to desired style from `cursory-presets'.
|
2024-12-30 19:02:45 +00:00
|
|
|
|
(cursory-set-preset (or (cursory-restore-latest-preset) 'box-no-blink))
|
2024-11-13 02:28:49 +00:00
|
|
|
|
|
|
|
|
|
(cursory-mode 1))
|
|
|
|
|
|
|
|
|
|
;;;; Fontaine (font configurations)
|
|
|
|
|
;; Read the manual: <https://protesilaos.com/emacs/fontaine>
|
|
|
|
|
(use-package fontaine
|
2025-02-16 22:46:05 +00:00
|
|
|
|
:ensure t
|
|
|
|
|
:if (display-graphic-p)
|
|
|
|
|
:config
|
|
|
|
|
;; This is defined in Emacs C code: it belongs to font settings.
|
|
|
|
|
(setq x-underline-at-descent-line nil)
|
|
|
|
|
|
|
|
|
|
;; This is the default value. Just including it here for
|
|
|
|
|
;; completeness.
|
|
|
|
|
(setq fontaine-latest-state-file (locate-user-emacs-file "fontaine-latest-state.eld"))
|
|
|
|
|
|
|
|
|
|
(setq fontaine-presets
|
|
|
|
|
'((small
|
|
|
|
|
:default-height 120)
|
|
|
|
|
(regular
|
|
|
|
|
:default-height 130)
|
|
|
|
|
(medium
|
|
|
|
|
:default-weight semilight
|
|
|
|
|
:default-height 170
|
|
|
|
|
:bold-weight extrabold)
|
|
|
|
|
(large
|
|
|
|
|
:inherit medium
|
|
|
|
|
:default-height 190)
|
|
|
|
|
(presentation
|
|
|
|
|
:inherit medium
|
|
|
|
|
:default-height 250)
|
|
|
|
|
(jumbo
|
|
|
|
|
:inherit medium
|
|
|
|
|
:default-height 330)
|
|
|
|
|
(t
|
|
|
|
|
;; See the fontaine manual for the technicalities:
|
|
|
|
|
;; <https://protesilaos.com/emacs/fontaine>.
|
|
|
|
|
:default-family "Noto Sans Mono"
|
|
|
|
|
:default-weight normal
|
|
|
|
|
:variable-pitch-family "Iosevka"
|
|
|
|
|
:variable-pitch-height 1.05)))
|
|
|
|
|
(fontaine-set-preset (or (fontaine-restore-latest-preset) 'small))
|
|
|
|
|
(fontaine-mode 1))
|
2024-11-13 02:28:49 +00:00
|
|
|
|
|
2024-11-17 02:44:22 +00:00
|
|
|
|
;;;; Show Font (preview fonts)
|
|
|
|
|
;; Read the manual: <https://protesilaos.com/emacs/show-font>
|
|
|
|
|
(use-package show-font
|
|
|
|
|
:ensure t
|
|
|
|
|
:commands (show-font-select-preview show-font-list)
|
|
|
|
|
:config
|
|
|
|
|
;; These are the defaults, but I keep them here for easier access.
|
|
|
|
|
(setq show-font-pangram 'prot)
|
|
|
|
|
(setq show-font-character-sample
|
|
|
|
|
"
|
|
|
|
|
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
|
|
|
abcdefghijklmnopqrstuvwxyz
|
|
|
|
|
0123456789 !@#$¢%^&*~|
|
|
|
|
|
`'\"‘’“”.,;: ()[]{}—-_+=<>
|
|
|
|
|
|
|
|
|
|
()[]{}<>«»‹› 6bB8&0ODdoa 1tiIlL|\/
|
|
|
|
|
!ij c¢ 5$Ss 7Z2z 9gqp nmMNNMW uvvwWuuw
|
|
|
|
|
x×X .,·°;:¡!¿?`'‘’ ÄAÃÀ TODO
|
|
|
|
|
"))
|
|
|
|
|
|
2024-11-14 16:38:27 +00:00
|
|
|
|
;;;;; `variable-pitch-mode' setup
|
|
|
|
|
(use-package face-remap
|
|
|
|
|
:ensure nil
|
|
|
|
|
:functions prot/enable-variable-pitch
|
|
|
|
|
:bind ( :map ctl-x-x-map
|
|
|
|
|
("v" . variable-pitch-mode))
|
|
|
|
|
:hook ((text-mode notmuch-show-mode elfeed-show-mode) . prot/enable-variable-pitch)
|
|
|
|
|
:config
|
|
|
|
|
;; NOTE 2022-11-20: This may not cover every case, though it works
|
|
|
|
|
;; fine in my workflow. I am still undecided by EWW.
|
|
|
|
|
(defun prot/enable-variable-pitch ()
|
2024-12-31 20:51:51 +00:00
|
|
|
|
(unless (derived-mode-p 'mhtml-mode 'nxml-mode 'yaml-mode 'prog-mode)
|
2024-11-14 16:38:27 +00:00
|
|
|
|
(variable-pitch-mode 1)))
|
|
|
|
|
;;;;; Resize keys with global effect
|
|
|
|
|
:bind
|
|
|
|
|
;; Emacs 29 introduces commands that resize the font across all
|
|
|
|
|
;; buffers (including the minibuffer), which is what I want, as
|
|
|
|
|
;; opposed to doing it only in the current buffer. The keys are the
|
|
|
|
|
;; same as the defaults.
|
|
|
|
|
(("C-x C-=" . global-text-scale-adjust)
|
|
|
|
|
("C-x C-+" . global-text-scale-adjust)
|
|
|
|
|
("C-x C-0" . global-text-scale-adjust)))
|
|
|
|
|
|
2024-12-31 20:51:51 +00:00
|
|
|
|
(provide 'nebkor-theme)
|