(Emacs/elisp)+custom solarized based theme

This commit is contained in:
2024-07-02 13:19:51 +01:00
parent e2dba6be76
commit 8df9015d09
3 changed files with 135 additions and 10 deletions

View File

@@ -7,7 +7,6 @@
#+latex_header:\usepackage[margin=1.0in]{geometry}
#+latex_class: article
#+latex_class_options: [a4paper,12pt]
* Introduction
:PROPERTIES:
:header-args:emacs-lisp: :tangle config.el :results none
@@ -179,21 +178,18 @@ General look and feel of Emacs (mostly disabling stuff I don't like).
** Themes
I have both a dark and light theme for differing situations.
*** Dark theme
My preferred dark theme is my own "personal-primary" theme which is
My preferred dark theme is my own "personal-solarized" theme which is
stored in the Emacs lisp folder (look at
[[file:elisp/personal-primary-theme.el][this file]]). It tries to use
the primary colours for everything, which makes it quite simple to
look at.
I have an older version of this theme that uses a homogeneous colour
scheme ([[file:elisp/personal-theme.el][this file]])
[[file:elisp/personal-solarized-theme.el][this file]]). It's
essentially a copy of the solarized theme (from the ~solarized-themes~
package) with a few personal changes.
#+begin_src emacs-lisp
(use-package custom
:demand t
:init
(setq custom-theme-directory (concat user-emacs-directory "elisp/"))
:config
(load-theme 'personal-primary t))
(load-theme 'personal-solarized t))
#+end_src
*** Switching between light and dark
I'm not very good at designing light themes as I don't really use
@@ -222,7 +218,7 @@ dark easily, so here's a command to switch between them.
(setq +oreo/theme 'light))
(light
(mapc #'disable-theme custom-enabled-themes)
(load-theme 'personal-primary t)
(load-theme 'personal-solarized t)
(setq +oreo/theme 'dark)))))
#+end_src
** Font size

View File

@@ -0,0 +1,129 @@
(deftheme personal-solarized
"Created 2024-07-02.")
(defvar personal-solarized-name-colour "#3c98e0"
"Colour of names in this theme.")
(custom-theme-set-faces
'personal-solarized
'(button ((t (:inherit (link)))))
'(child-frame-border ((t (:background "white"))))
'(company-preview ((t (:foreground "wheat" :background "blue4"))))
'(company-preview-common ((t (:inherit company-preview :foreground "grey"))))
'(company-tooltip ((t (:background "black" :foreground "white"))))
'(company-tooltip-annotation ((t (:foreground "grey" :slant italic))))
'(company-tooltip-selection ((t (:background "grey31" :slant italic))))
'(cursor ((t (:background "white"))))
'(dired-ignored ((t (:background "grey10" :slant italic :underline t))))
'(escape-glyph ((t (:foreground "cyan"))))
'(eshell-ls-directory ((t (:foreground "DeepSkyBlue3" :weight bold))))
'(eshell-prompt ((t (:foreground "turquoise3" :weight bold))))
'(fill-column-indicator ((t (:inherit shadow :foreground "gray23" :background "gray23" :weight thin))))
'(fixed-pitch ((t (:family "Monospace"))))
'(font-latex-bold-face ((t (:inherit bold :foreground "#9eacac"))))
'(font-latex-doctex-documentation-face ((t (:background unspecified))))
'(font-latex-doctex-preprocessor-face ((t (:inherit (font-latex-doctex-documentation-face font-lock-builtin-face font-lock-preprocessor-face)))))
'(font-latex-italic-face ((t (:inherit italic :foreground "#9eacac"))))
'(font-latex-math-face ((t (:foreground "#7a7ed2"))))
'(font-latex-sectioning-0-face ((t (:inherit font-latex-sectioning-1-face :height 1.1))))
'(font-latex-sectioning-1-face ((t (:inherit font-latex-sectioning-2-face :height 1.1))))
'(font-latex-sectioning-2-face ((t (:inherit font-latex-sectioning-3-face :height 1.1))))
'(font-latex-sectioning-3-face ((t (:inherit font-latex-sectioning-4-face :height 1.1))))
'(font-latex-sectioning-4-face ((t (:inherit font-latex-sectioning-5-face :height 1.1))))
'(font-latex-sectioning-5-face ((t (:inherit default :foreground "#c49619" :weight bold))))
'(font-latex-sedate-face ((t (:foreground "#9eacac"))))
'(font-latex-slide-title-face ((t (:inherit (default font-lock-type-face) :weight bold :height 1.2))))
'(font-latex-string-face ((t (:foreground "#3cafa5"))))
'(font-latex-subscript-face ((t (:height 0.8))))
'(font-latex-superscript-face ((t (:height 0.8))))
'(font-latex-verbatim-face ((t (:inherit fixed-pitch :foreground "#8d9fa1" :slant italic))))
'(font-latex-warning-face ((t (:inherit bold :foreground "#db5823"))))
'(font-lock-builtin-face ((t (:foreground "#8d9fa1" :weight bold :slant normal))))
'(font-lock-comment-delimiter-face ((t (:foreground "#62787f" :slant normal))))
'(font-lock-comment-face ((t (:foreground "#62787f"))))
'(font-lock-doc-face ((t (:foreground "#3cafa5" :slant normal))))
'(font-lock-keyword-face ((t (:foreground "#93a61a" :weight bold))))
'(font-lock-negation-char-face ((t (:foreground "#c49619" :weight bold))))
'(font-lock-regexp-grouping-backslash ((t (:foreground "#93a61a" :weight bold))))
'(font-lock-regexp-grouping-construct ((t (:foreground "#c49619" :weight bold))))
'(font-lock-string-face ((t (:foreground "#3cafa5"))))
'(font-lock-type-face ((t (:foreground "#c49619"))))
'(font-lock-warning-face ((t (:inherit error :weight bold))))
'(fringe ((t (:inherit (default)))))
'(haskell-interactive-face-prompt ((t (:foreground "green"))))
'(header-line ((t (:box nil :foreground "grey90" :background "grey20" :inherit (mode-line)))))
'(highlight ((t (:extend t :background "#222233"))))
'(homoglyph ((t (:foreground "cyan"))))
'(isearch ((t (:foreground "brown4" :background "white"))))
'(isearch-fail ((t (:background "red4"))))
'(ivy-current-match ((t (:weight bold :underline t :slant italic))))
'(lazy-highlight ((t (:background "paleturquoise4"))))
'(line-number ((t (:foreground "grey45" :background "grey1" :inherit (default)))))
'(line-number-current-line ((t (:foreground "white" :background "grey1" :inherit (default)))))
'(link ((t (:underline (:color foreground-color :style line) :foreground "cyan1"))))
'(link-visited ((t (:foreground "violet" :inherit (link)))))
'(match ((t (:background "RoyalBlue3"))))
'(minibuffer-prompt ((t (:foreground "cyan"))))
'(mode-line ((t (:box nil :foreground "LightSkyBlue" :background "black" :inherit (default)))))
'(mode-line-buffer-id ((t (:weight bold))))
'(mode-line-emphasis ((t (:weight bold))))
'(mode-line-inactive ((t (:box nil :weight light :foreground "CadetBlue" :background "grey7" :inherit (default)))))
'(next-error ((t (:inherit (region)))))
'(orderless-match-face-0 ((t (:weight bold :foreground "lime green"))))
'(orderless-match-face-1 ((t (:weight bold :foreground "light green"))))
'(orderless-match-face-2 ((t (:weight bold :foreground "forest green"))))
'(orderless-match-face-3 ((t (:weight bold :foreground "dark green"))))
'(org-block ((t (:background "grey3" :inherit shadow))))
'(org-code ((t (:foreground "green3"))))
'(org-quote ((t (:slant italic))))
'(org-verbatim ((t (:foreground "red3"))))
'(outline-1 ((t (:inherit default :foreground "#db5823"))))
'(outline-2 ((t (:inherit default :foreground "#93a61a"))))
'(outline-3 ((t (:inherit default :foreground "#3c98e0"))))
'(outline-4 ((t (:inherit default :foreground "#c49619"))))
'(outline-5 ((t (:inherit default :foreground "#3cafa5"))))
'(outline-6 ((t (:inherit default :foreground "#93a61a"))))
'(outline-7 ((t (:inherit default :foreground "#ec423a"))))
'(outline-8 ((t (:inherit default :foreground "#3c98e0"))))
'(outline-minor-0 ((t (:extend t :weight bold :background "#01323d"))))
'(outline-minor-1 ((t (:extend t :inherit (outline-minor-0 outline-1) :background "#1e9d310d32a3"))))
'(pdf-isearch-batch ((t (:foreground "black" :background "white"))))
'(pretty-mode-symbol-face ((t (:foreground "#c49619" :weight normal))))
'(query-replace ((t (:inherit (isearch)))))
'(rainbow-delimiters-base-error-face ((t (:extend t :foreground "white" :background "red1"))))
'(rainbow-delimiters-depth-1-face ((t (:extend t :foreground "red"))))
'(rainbow-delimiters-depth-2-face ((t (:extend t :foreground "darkorange"))))
'(rainbow-delimiters-depth-3-face ((t (:extend t :foreground "yellow"))))
'(rainbow-delimiters-depth-4-face ((t (:extend t :foreground "green"))))
'(rainbow-delimiters-depth-5-face ((t (:extend t :foreground "DeepSkyBlue"))))
'(rainbow-delimiters-depth-6-face ((t (:extend t :foreground "purple"))))
'(rainbow-delimiters-depth-7-face ((t (:extend t :foreground "violet"))))
'(rainbow-delimiters-mismatched-face ((t (:extend t :foreground "white" :background "red4"))))
'(rainbow-delimiters-unmatched-face ((t (:extend t :foreground "white" :background "red3"))))
'(region ((t (:extend t :background "grey25"))))
'(secondary-selection ((t (:extend t :background "SkyBlue4"))))
'(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50"))
(((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70"))
(((class color) (min-colors 8) (background light)) (:foreground "green"))
(((class color) (min-colors 8) (background dark)) (:foreground "yellow"))))
'(show-paren-match ((t (:foreground unspecified :background "#55ec55" :weight bold))))
'(show-paren-mismatch ((t (:foreground "#01323d" :background "#ec1111" :weight bold))))
'(tab-bar ((t (:background "grey13"))))
'(tab-bar-tab ((t (:background "grey20" :foreground "white" :box (:color )))))
'(tab-bar-tab-inactive ((t (:background "grey13" :foreground "DimGrey"))))
'(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch)))))
'(trailing-whitespace ((t (:background "red1"))))
'(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif"))))
'(whitespace-line ((t (:background "black" :foreground "violet"))))
'(whitespace-space ((t (:background "#0a0a0a" :foreground "black"))))
'(whitespace-tab ((t (:background "grey5" :foreground "grey20"))))
`(font-lock-constant-face ((t (:foreground ,personal-solarized-name-colour :weight bold))))
`(font-lock-function-name-face ((t (:box nil :foreground ,personal-solarized-name-colour))))
`(font-lock-preprocessor-face ((t (:foreground ,personal-solarized-name-colour))))
`(font-lock-variable-name-face ((t (:foreground ,personal-solarized-name-colour))))
'(default ((t (:family "Hack" :foundry "ADBO" :width normal
:weight normal :slant normal :underline nil :overline nil
:extend nil :strike-through nil :box nil :inverse-video nil
:foreground "#b6b6b6" :background "black" :stipple nil :inherit nil)))))
(provide-theme 'personal-solarized)