2022-06-19 14:13:36 -08:00
|
|
|
;;; mitch-theme.el --- set visual theme in the only unique way
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;; When I first started using `nvim', I copied my `nano' config
|
|
|
|
;; which was very cringe and basic. And so I scoured the internet
|
|
|
|
;; for themes. And discovered something truly disturbing:
|
|
|
|
;; Every single `nvim' and `emacs' theme looks exactly the same,
|
|
|
|
;; and they're all gray-on-gray cringe. I prefer my cringe to really
|
|
|
|
;; pop rather than ooze before my eyes, so I somehow found the `nvim'
|
|
|
|
;; theme that gradually became this.
|
|
|
|
;; We require 'autothemer because it makes the face declaration so much
|
|
|
|
;; simpler.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
(require 'autothemer)
|
|
|
|
|
|
|
|
;; set font...
|
|
|
|
;; Taken from https://web.archive.org/web/20210622224446/https://www.manueluberti.eu/emacs/2017/02/26/dynamicfonts/
|
|
|
|
|
|
|
|
;; insane font stuff. Might be what breaks something.
|
|
|
|
;; (defun mitch/setup-main-fonts (default-height variable-pitch-height)
|
|
|
|
;; "Set up default fonts.
|
|
|
|
|
|
|
|
;; Use DEFAULT-HEIGHT for default face and VARIABLE-PITCH-HEIGHT
|
|
|
|
;; for variable-pitch face."
|
|
|
|
;; (set-face-attribute 'default nil
|
|
|
|
;; :family "MesloLGS NF"
|
|
|
|
;; :height default-height)
|
|
|
|
;; (set-face-attribute 'variable-pitch nil
|
|
|
|
;; :height variable-pitch-height
|
|
|
|
;; :weight 'regular))
|
|
|
|
;; ;; Now I just have to call this function with the proper values for :height
|
|
|
|
;; ;; according to the screen size.
|
|
|
|
;; (when window-system
|
|
|
|
;; (if (> (x-display-pixel-width) 1800)
|
|
|
|
;; (mitch/setup-main-fonts 130 140)
|
|
|
|
;; (mitch/setup-main-fonts 110 120)))
|
|
|
|
|
|
|
|
;; sane font stuff
|
|
|
|
(set-face-attribute 'fixed-pitch nil
|
|
|
|
:family "MesloLGS NF"
|
|
|
|
:height 130)
|
|
|
|
(set-face-attribute 'default nil
|
|
|
|
:family "MesloLGS NF"
|
|
|
|
:height 130)
|
|
|
|
(set-face-attribute 'variable-pitch nil
|
2022-09-29 06:44:07 -08:00
|
|
|
:inherit 'default
|
2022-06-19 14:13:36 -08:00
|
|
|
:height 140
|
2022-09-29 06:44:07 -08:00
|
|
|
:family "Sans Serif")
|
2022-06-19 14:13:36 -08:00
|
|
|
|
|
|
|
(setq rainbow-delimiters-max-face-count 2)
|
|
|
|
;; (setq org-fontify-quote-and-verse-blocks t)
|
|
|
|
|
|
|
|
;; Set transparent background; might break older emacsen
|
2022-07-09 18:45:39 -08:00
|
|
|
(add-to-list 'initial-frame-alist '(alpha-background . 50))
|
2022-09-24 19:01:11 -08:00
|
|
|
(add-to-list 'default-frame-alist '(alpha-background . 50))
|
2022-06-19 14:13:36 -08:00
|
|
|
(add-to-list 'default-frame-alist '(cursor-color . "white"))
|
|
|
|
(add-to-list 'default-frame-alist '(fullscreen . maximized))
|
|
|
|
|
|
|
|
(autothemer-deftheme
|
|
|
|
mitch "Based on my nvim theme. Because everything else looks the same."
|
|
|
|
|
|
|
|
;; Specify the color classes used by the theme
|
|
|
|
((
|
|
|
|
((class color) (min-colors #xFFFFFF)) ;; truecolor
|
|
|
|
((class color) (min-colors #xFF )) ;; 256color
|
|
|
|
((class color) (min-colors 16 )) ;; 16color
|
|
|
|
((class color) (min-colors 8 )) ;; 8color
|
|
|
|
)
|
|
|
|
|
|
|
|
;; Specify the color palette for each of the classes above.
|
2022-07-25 06:47:18 -08:00
|
|
|
(mitch-black "black" 'nil)
|
2022-06-19 14:13:36 -08:00
|
|
|
(mitch-red "red" )
|
|
|
|
(mitch-green "ForestGreen")
|
|
|
|
(mitch-yellow "gold1" "white")
|
|
|
|
(mitch-blue "blue" )
|
|
|
|
(mitch-magenta "magenta")
|
|
|
|
(mitch-cyan "cyan")
|
|
|
|
(mitch-white "white")
|
|
|
|
(mitch-pink "pink2")
|
|
|
|
(mitch-light-black "grey19" "grey19" "gray")
|
|
|
|
(mitch-light-red "orange")
|
|
|
|
(mitch-light-green "green3")
|
|
|
|
(mitch-light-yellow "PaleGoldenrod")
|
|
|
|
(mitch-light-blue "RoyalBlue")
|
|
|
|
(mitch-light-magenta "DarkMagenta")
|
2022-07-25 06:47:18 -08:00
|
|
|
(mitch-light-cyan "turquoise3" "lightseagreen")
|
2022-06-19 14:13:36 -08:00
|
|
|
(mitch-light-white "grey69")
|
2022-07-25 06:47:18 -08:00
|
|
|
(mitch-visual-bg "DarkBlue" "midnightblue")
|
2022-06-19 14:13:36 -08:00
|
|
|
(mitch-dark-gray "grey7")
|
|
|
|
(mitch-dark-yellow "DarkGoldenrod1")
|
|
|
|
(mitch-dark-red "DarkRed")
|
|
|
|
(mitch-mid-gray "grey33")
|
|
|
|
(mitch-mid-violet "BlueViolet")
|
2022-08-08 06:38:17 -08:00
|
|
|
(mitch-mid-red "red3")
|
2022-06-19 14:13:36 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
;; specifications for Emacs faces.
|
|
|
|
(
|
|
|
|
;; (default (:background mitch-black :foreground mitch-light-yellow))
|
2022-08-08 06:38:17 -08:00
|
|
|
(default (:background mitch-black :foreground mitch-white))
|
2022-07-25 06:47:18 -08:00
|
|
|
(default (:slant 'normal))
|
|
|
|
(cursor (:inverse-video t))
|
2022-06-19 14:13:36 -08:00
|
|
|
(highlight (:background mitch-visual-bg))
|
|
|
|
(region (:inherit 'highlight))
|
|
|
|
(link (:foreground mitch-light-blue :underline 't))
|
|
|
|
(link-visited (:foreground mitch-mid-violet :underline 't))
|
|
|
|
(whitespace-line (:background mitch-dark-red))
|
2022-07-25 06:47:18 -08:00
|
|
|
(line-number (:background 'nil :inherit 'font-lock-comment-delimiter-face))
|
2022-08-24 19:12:33 -08:00
|
|
|
(line-number-current-line (:inherit
|
|
|
|
'line-number
|
|
|
|
:foreground mitch-yellow
|
|
|
|
:weight 'bold))
|
2022-06-19 14:13:36 -08:00
|
|
|
(linum (:inherit 'line-number))
|
|
|
|
(linum-relative-current-face (:inherit 'line-number-current-line))
|
2022-07-09 18:45:39 -08:00
|
|
|
(ivy-current-match (:inherit 'highlight :extend t))
|
2022-07-05 20:56:48 -08:00
|
|
|
(ivy-separator (:inherit 'marginalia-documentation))
|
2022-07-25 06:47:18 -08:00
|
|
|
(show-paren-match (:background mitch-light-cyan))
|
2022-06-19 14:13:36 -08:00
|
|
|
;; font-lock faces. The defaults that are important to get right.
|
|
|
|
(font-lock-comment-face (:foreground mitch-green :slant 'oblique))
|
|
|
|
(font-lock-comment-delimiter-face (:foreground mitch-light-black))
|
|
|
|
(font-lock-constant-face (:foreground mitch-light-white :weight 'normal))
|
|
|
|
(font-lock-string-face (:foreground mitch-light-blue :slant 'italic))
|
|
|
|
(font-lock-builtin-face (:foreground mitch-light-white :weight 'bold))
|
2022-08-08 06:38:17 -08:00
|
|
|
(font-lock-keyword-face (:foreground mitch-mid-red :weight 'normal))
|
2022-06-19 14:13:36 -08:00
|
|
|
(font-lock-type-face (:foreground mitch-light-red :weight 'bold))
|
2022-08-08 06:38:17 -08:00
|
|
|
(font-lock-function-name-face (:foreground mitch-red :weight 'normal))
|
2022-06-19 14:13:36 -08:00
|
|
|
(font-lock-variable-name-face (:foreground mitch-light-cyan :weight 'normal))
|
|
|
|
(font-lock-negation-char-face (:foreground mitch-visual-bg :weight 'bold))
|
|
|
|
;; other things
|
2022-08-24 19:12:33 -08:00
|
|
|
(transient-heading (:inherit 'default
|
|
|
|
:foreground mitch-magenta
|
|
|
|
:weight 'bold))
|
2022-06-19 14:13:36 -08:00
|
|
|
(rainbow-delimiters-depth-1-face (:foreground mitch-light-magenta))
|
|
|
|
(rainbow-delimiters-depth-2-face (:foreground mitch-magenta :weight 'normal))
|
2022-07-11 17:59:39 -08:00
|
|
|
(vertical-border (:foreground mitch-mid-violet :weight 'bold))
|
2022-06-19 14:13:36 -08:00
|
|
|
(fringe (:inherit 'default))
|
|
|
|
(whitespace-space (:foreground mitch-black))
|
|
|
|
(whitespace-tab (:foreground mitch-black))
|
|
|
|
(whitespace-newline (:foreground mitch-black))
|
|
|
|
(org-meta-line (:inherit 'font-lock-comment-delimiter-face))
|
2022-08-24 19:12:33 -08:00
|
|
|
(isearch (:foreground mitch-dark-yellow
|
|
|
|
:background mitch-light-magenta
|
|
|
|
:weight 'bold))
|
2022-06-19 14:13:36 -08:00
|
|
|
(lazy-highlight (:inherit 'isearch))
|
|
|
|
(completions-highlight (:background mitch-mid-violet))
|
|
|
|
(corfu-default (:background mitch-mid-gray))
|
|
|
|
(corfu-current (:inherit 'completions-highlight))
|
2022-07-25 06:47:18 -08:00
|
|
|
;; ansi colors
|
2022-07-20 17:30:47 -08:00
|
|
|
(ansi-color-black (:foreground mitch-black :background mitch-light-black))
|
|
|
|
(ansi-color-red (:foreground mitch-red :background mitch-light-red))
|
|
|
|
(ansi-color-green (:foreground mitch-green :background mitch-light-green))
|
|
|
|
(ansi-color-yellow (:foreground mitch-yellow :background mitch-light-yellow))
|
|
|
|
(ansi-color-blue (:foreground mitch-blue :background mitch-light-blue))
|
2022-08-24 19:12:33 -08:00
|
|
|
(ansi-color-magenta (:foreground mitch-magenta
|
|
|
|
:background mitch-light-magenta))
|
2022-07-20 17:30:47 -08:00
|
|
|
(ansi-color-cyan (:foreground mitch-cyan :background mitch-light-cyan))
|
|
|
|
(ansi-color-white (:foreground mitch-white :background mitch-light-white))
|
2022-08-24 19:12:33 -08:00
|
|
|
(ansi-color-bright-black (:background mitch-black
|
|
|
|
:foreground mitch-light-black))
|
2022-07-20 17:30:47 -08:00
|
|
|
(ansi-color-bright-red (:background mitch-red :foreground mitch-light-red))
|
2022-08-24 19:12:33 -08:00
|
|
|
(ansi-color-bright-green (:background mitch-green
|
|
|
|
:foreground mitch-light-green))
|
|
|
|
(ansi-color-bright-yellow (:background mitch-yellow
|
|
|
|
:foreground mitch-light-yellow))
|
2022-07-20 17:30:47 -08:00
|
|
|
(ansi-color-bright-blue (:background mitch-blue :foreground mitch-light-blue))
|
2022-08-24 19:12:33 -08:00
|
|
|
(ansi-color-bright-magenta (:background mitch-magenta
|
|
|
|
:foreground mitch-light-magenta))
|
2022-07-20 17:30:47 -08:00
|
|
|
(ansi-color-bright-cyan (:background mitch-cyan :foreground mitch-light-cyan))
|
2022-08-24 19:12:33 -08:00
|
|
|
(ansi-color-bright-white (:background mitch-white
|
|
|
|
:foreground mitch-light-white))
|
|
|
|
;; eshell colors
|
|
|
|
(epe-dir-face (:foreground mitch-cyan))
|
|
|
|
(eshell-syntax-highlighting-shell-command-face (:foreground
|
|
|
|
mitch-light-green))
|
|
|
|
(eshell-syntax-highlighting-lisp-function-face (:foreground
|
|
|
|
mitch-light-green))
|
|
|
|
(eshell-syntax-highlighting-alias-face (:foreground
|
|
|
|
mitch-light-green))
|
|
|
|
(eshell-syntax-highlighting-invalid-face (:weight 'bold
|
|
|
|
:foreground mitch-red))
|
|
|
|
(epe-status-face (:inherit 'font-lock-constant-face))
|
2022-08-28 14:24:13 -08:00
|
|
|
(eshell-syntax-highlighting-file-arg-face (:foreground
|
|
|
|
mitch-magenta
|
|
|
|
:underline 't))
|
2022-06-19 14:13:36 -08:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(provide-theme 'mitch)
|
|
|
|
;;; mitch-theme.el ends here
|