Create my own dark theme
This commit is contained in:
parent
105a97250c
commit
6fc09faf66
6 changed files with 636 additions and 33 deletions
|
@ -144,7 +144,6 @@ Much of my more complicated code comes from my website essays and other projects
|
|||
(add-to-list 'load-path (expand-file-name "elisp" user-emacs-directory))
|
||||
#+end_src
|
||||
|
||||
Hopefully, this will tie me over while I transition.
|
||||
* Emacs Server Control
|
||||
I actually run two instances of Emacs on some systems, where one instance has all my work-related projects, perspectives, and packages installed (like LSP), and my personal instance has other packages running (like IRC and Mail). I need a function that can make that distinction, and based on that, it will set =server-start= appropriately, so that =emacsclient= can call into the correct one.
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -174,13 +173,14 @@ The following /defines/ the rest of my org-mode literate files, that I load late
|
|||
#+begin_src emacs-lisp
|
||||
(defvar ha-hamacs-files (flatten-list
|
||||
`("ha-private.org"
|
||||
,(when (display-graphic-p)
|
||||
"ha-theme.org"
|
||||
"ha-display.org")
|
||||
"ha-config.org"
|
||||
;; "ha-leader.org"
|
||||
"ha-evil.org"
|
||||
;; "ha-meow.org"
|
||||
"ha-applications.org"
|
||||
,(when (display-graphic-p)
|
||||
"ha-display.org")
|
||||
"ha-org.org"
|
||||
,(when (display-graphic-p)
|
||||
"ha-org-word-processor.org")
|
||||
|
|
|
@ -318,8 +318,13 @@ Which font to choose?
|
|||
#+begin_src emacs-lisp
|
||||
(use-package mixed-pitch
|
||||
:straight (:host github :repo "jabranham/mixed-pitch")
|
||||
:config
|
||||
(add-to-list 'mixed-pitch-fixed-pitch-faces 'org-property-value)
|
||||
(add-to-list 'mixed-pitch-fixed-pitch-faces 'font-lock-comment-face)
|
||||
:hook (text-mode . mixed-pitch-mode))
|
||||
#+end_src
|
||||
|
||||
|
||||
** Zooming or Increasing Font Size
|
||||
Do we want to increase the size of font in a single window (using =text-scale-increase=), or globally (using my new =font-size-increase=)?
|
||||
|
||||
|
@ -353,16 +358,7 @@ And some keybindings to call them:
|
|||
(global-set-key (kbd "s--") 'font-size-decrease)
|
||||
#+end_src
|
||||
* Themes
|
||||
One does get used to a particular collection of colors. After happily using Steve Purcell’s port of the Tomorrow theme for many years, I decided I needed a change. First, I want Emacs to be less garish:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package doom-themes
|
||||
:config
|
||||
;; Global settings (defaults)
|
||||
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||
(load-theme 'doom-wilmersdorf t))
|
||||
#+end_src
|
||||
One does get used to a particular collection of colors. After happily using Steve Purcell’s port of the Tomorrow theme for years, I decided I needed a change, so I made [[file:ha-theme.org][made my own theme]].
|
||||
|
||||
Most of the time, Emacs is on my desk is a darkened room, so I choose the dark theme:
|
||||
|
||||
|
@ -370,10 +366,7 @@ Most of the time, Emacs is on my desk is a darkened room, so I choose the dark t
|
|||
(defun laptop-inside ()
|
||||
"Customize the theme for inside programming."
|
||||
(interactive)
|
||||
(load-theme 'doom-wilmersdorf t)
|
||||
(ignore-errors
|
||||
;; TODO: File in progress!
|
||||
(load-file "~/src/hamacs/ha-theme-dark.el"))
|
||||
(load-theme 'hamacs)
|
||||
(ha-word-processor-fonts))
|
||||
#+end_src
|
||||
|
||||
|
@ -383,34 +376,43 @@ But, when feeling adventurous, I /sometimes/ take my laptop outside:
|
|||
(defun laptop-in-the-sun ()
|
||||
"Customize the theme for outside programming."
|
||||
(interactive)
|
||||
(load-theme 'doom-ayu-light t)
|
||||
(set-face-attribute 'default nil :foreground "#0c0906")
|
||||
(set-face-attribute 'region nil :background "orange")
|
||||
(set-face-attribute 'org-block nil :background "#f2f1ef")
|
||||
(set-face-attribute 'org-block-begin-line nil :foreground "#999491" :background "#e5e4e3")
|
||||
|
||||
(use-package doom-themes
|
||||
:config
|
||||
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
doom-themes-enable-italic t)
|
||||
(load-theme 'doom-ayu-light t)
|
||||
|
||||
;; This theme needs a bit of help:
|
||||
(set-face-attribute 'default nil :foreground "#0c0906")
|
||||
(set-face-attribute 'org-block nil :background "#f2f1ef")
|
||||
(set-face-attribute 'org-block-begin-line nil :foreground "#999491" :background "#e5e4e3")
|
||||
(set-face-attribute 'font-lock-comment-face nil :foreground "#888888" :slant 'italic :weight 'normal)
|
||||
(set-face-attribute 'font-lock-comment-delimiter-face nil :foreground "#aaaaaa" :slant 'italic :weight 'bold))
|
||||
|
||||
(ha-word-processor-fonts))
|
||||
#+end_src
|
||||
|
||||
I’ve been playing around with making the current window more pronounced.
|
||||
This isn’t needed as much with the [[*Window Dimmer][Window Dimmer]] feature, but if I do, this would be the settings:
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(set-face-attribute 'mode-line nil :background "#cccccc")
|
||||
(set-face-attribute 'mode-line-inactive nil :background "#888888")
|
||||
#+end_src
|
||||
|
||||
Oh, and turn off the line highlighting:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(global-hl-line-mode -1)
|
||||
#+end_src
|
||||
|
||||
And of course, the default is /inside/ where it is dark and safe. Let’s also wait til the world settles down before calling this.
|
||||
And of course, the default is /inside/ where my mind is dark and safe:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(progn
|
||||
(sit-for 2)
|
||||
(laptop-inside))
|
||||
(add-to-list 'custom-theme-load-path hamacs-source-dir)
|
||||
|
||||
;; (ha-hamacs-load "ha-theme.org")
|
||||
;; (ha-hamacs-tangle "ha-theme.org")
|
||||
(require 'hamacs-theme)
|
||||
(load-theme 'hamacs)
|
||||
|
||||
(laptop-inside)
|
||||
#+end_src
|
||||
** Highlight Task Labels
|
||||
In code, if you drop a specific /text/ labels, we can highlight them with [[https://github.com/tarsius/hl-todo][hl-todo package]]:
|
||||
|
@ -426,13 +428,14 @@ In code, if you drop a specific /text/ labels, we can highlight them with [[http
|
|||
(global-hl-todo-mode 1))
|
||||
#+end_src
|
||||
|
||||
This means that comments like the following visually standout:
|
||||
TODO Attempt to validate that this shows something I need to do.
|
||||
This package visually standout comments like:
|
||||
TODO Fix bug where highlight isn’t loading
|
||||
|
||||
Suggests to bind some keys to =hl-todo-next= in order to jump from tag to tag, but the [[https://github.com/liuyinz/consult-todo][consult-todo]] implements that in a more visual way:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package consult-todo
|
||||
:straight (:host github :repo "liuyinz/consult-todo")
|
||||
:init
|
||||
(defconst consult-todo--narrow
|
||||
'((?t . "TODO")
|
||||
|
|
|
@ -46,6 +46,12 @@ Since I use ellipsis in my writing… to /change/ how org renders a collapsed he
|
|||
org-agenda-breadcrumbs-separator " ❱ "))
|
||||
#+end_src
|
||||
|
||||
I would like Quote and Verse blocks /special/, that is, in italics. This means, we first need to allow them to be /different/, and then I can alter [[file:ha-theme.org][my theme]] to make quotes italics:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq org-fontify-quote-and-verse-blocks t)
|
||||
#+END_SRC
|
||||
|
||||
Oh, and as I indent lists, they should change the /bulleting/ in a particular sequence. If I begin with an =*= asterisk, I walk down the chain, but with the dashed bullets (my default choice), I stay with dashed bullets. Numeric bullets should cycle:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
|
66
ha-theme-colors.svg
Normal file
66
ha-theme-colors.svg
Normal file
|
@ -0,0 +1,66 @@
|
|||
<svg xmlns='http://www.w3.org/2000/svg' class="pikchr" viewBox="0 0 357.12 594.72">
|
||||
<path d="M2.16,74.16L110.16,74.16L110.16,2.16L2.16,2.16Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(134,1,22);" />
|
||||
<text x="56.16" y="28.08" text-anchor="middle" fill="rgb(134,1,22)" dominant-baseline="central">Red</text>
|
||||
<text x="56.16" y="48.24" text-anchor="middle" fill="rgb(134,1,22)" dominant-baseline="central">#860116</text>
|
||||
<path d="M124.56,74.16L232.56,74.16L232.56,2.16L124.56,2.16Z" style="fill:rgb(134,1,22);stroke-width:2.16;stroke:rgb(12,9,6);" />
|
||||
<text x="178.56" y="28.08" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H: 351</text>
|
||||
<text x="178.56" y="48.24" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">25/85</text>
|
||||
<path d="M246.96,74.16L354.96,74.16L354.96,2.16L246.96,2.16Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(216,162,170);" />
|
||||
<text x="300.96" y="28.08" text-anchor="middle" fill="rgb(216,162,170)" dominant-baseline="central">Red</text>
|
||||
<text x="300.96" y="48.24" text-anchor="middle" fill="rgb(216,162,170)" dominant-baseline="central">#d8a2aa</text>
|
||||
<path d="M2.16,160.56L110.16,160.56L110.16,88.56L2.16,88.56Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(206,95,21);" />
|
||||
<text x="56.16" y="114.48" text-anchor="middle" fill="rgb(206,95,21)" dominant-baseline="central">Orange</text>
|
||||
<text x="56.16" y="134.64" text-anchor="middle" fill="rgb(206,95,21)" dominant-baseline="central">#ce5f15</text>
|
||||
<path d="M124.56,160.56L232.56,160.56L232.56,88.56L124.56,88.56Z" style="fill:rgb(206,95,21);stroke-width:2.16;stroke:rgb(12,9,6);" />
|
||||
<text x="178.56" y="114.48" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H: 24</text>
|
||||
<text x="178.56" y="134.64" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">25/85</text>
|
||||
<path d="M246.96,160.56L354.96,160.56L354.96,88.56L246.96,88.56Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(216,158,119);" />
|
||||
<text x="300.96" y="114.48" text-anchor="middle" fill="rgb(216,158,119)" dominant-baseline="central">Warn</text>
|
||||
<text x="300.96" y="134.64" text-anchor="middle" fill="rgb(216,158,119)" dominant-baseline="central">#d89e77</text>
|
||||
<path d="M2.16,246.96L110.16,246.96L110.16,174.96L2.16,174.96Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(249,180,25);" />
|
||||
<text x="56.16" y="200.88" text-anchor="middle" fill="rgb(249,180,25)" dominant-baseline="central">Yellow</text>
|
||||
<text x="56.16" y="221.04" text-anchor="middle" fill="rgb(249,180,25)" dominant-baseline="central">#f9b419</text>
|
||||
<path d="M124.56,246.96L232.56,246.96L232.56,174.96L124.56,174.96Z" style="fill:rgb(249,180,25);stroke-width:2.16;stroke:rgb(12,9,6);" />
|
||||
<text x="178.56" y="200.88" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H: 42</text>
|
||||
<text x="178.56" y="221.04" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">45/85</text>
|
||||
<path d="M246.96,246.96L354.96,246.96L354.96,174.96L246.96,174.96Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(216,184,162);" />
|
||||
<text x="300.96" y="200.88" text-anchor="middle" fill="rgb(216,184,162)" dominant-baseline="central">Warn</text>
|
||||
<text x="300.96" y="221.04" text-anchor="middle" fill="rgb(216,184,162)" dominant-baseline="central">#d8bb77</text>
|
||||
<path d="M2.16,333.36L110.16,333.36L110.16,261.36L2.16,261.36Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(137,157,3);" />
|
||||
<text x="56.16" y="287.28" text-anchor="middle" fill="rgb(137,157,3)" dominant-baseline="central">Green</text>
|
||||
<text x="56.16" y="307.44" text-anchor="middle" fill="rgb(137,157,3)" dominant-baseline="central">#899d03</text>
|
||||
<path d="M124.56,333.36L232.56,333.36L232.56,261.36L124.56,261.36Z" style="fill:rgb(137,157,3);stroke-width:2.16;stroke:rgb(12,9,6);" />
|
||||
<text x="178.56" y="287.28" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H: 68</text>
|
||||
<text x="178.56" y="307.44" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">45/85</text>
|
||||
<path d="M246.96,333.36L354.96,333.36L354.96,261.36L246.96,261.36Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(179,191,142);" />
|
||||
<text x="300.96" y="287.28" text-anchor="middle" fill="rgb(179,191,142)" dominant-baseline="central">Warn</text>
|
||||
<text x="300.96" y="307.44" text-anchor="middle" fill="rgb(179,191,142)" dominant-baseline="central">#B3BF8E</text>
|
||||
<path d="M2.16,419.76L110.16,419.76L110.16,347.76L2.16,347.76Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(85,112,44);" />
|
||||
<text x="56.16" y="373.68" text-anchor="middle" fill="rgb(85,112,44)" dominant-baseline="central">Dk Green</text>
|
||||
<text x="56.16" y="393.84" text-anchor="middle" fill="rgb(85,112,44)" dominant-baseline="central">#55702c</text>
|
||||
<path d="M124.56,419.76L232.56,419.76L232.56,347.76L124.56,347.76Z" style="fill:rgb(85,112,44);stroke-width:2.16;stroke:rgb(12,9,6);" />
|
||||
<text x="178.56" y="373.68" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H: 68</text>
|
||||
<text x="178.56" y="393.84" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">45/85</text>
|
||||
<path d="M246.96,419.76L354.96,419.76L354.96,347.76L246.96,347.76Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(151,158,110);" />
|
||||
<text x="300.96" y="373.68" text-anchor="middle" fill="rgb(151,158,110)" dominant-baseline="central">Warn</text>
|
||||
<text x="300.96" y="393.84" text-anchor="middle" fill="rgb(151,158,110)" dominant-baseline="central">#979e6e</text>
|
||||
<path d="M2.16,506.16L110.16,506.16L110.16,434.16L2.16,434.16Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(111,139,147);" />
|
||||
<text x="56.16" y="460.08" text-anchor="middle" fill="rgb(111,139,147)" dominant-baseline="central">Blue</text>
|
||||
<text x="56.16" y="480.24" text-anchor="middle" fill="rgb(111,139,147)" dominant-baseline="central">#6f8b93</text>
|
||||
<path d="M124.56,506.16L232.56,506.16L232.56,434.16L124.56,434.16Z" style="fill:rgb(111,139,147);stroke-width:2.16;stroke:rgb(12,9,6);" />
|
||||
<text x="178.56" y="460.08" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H: 193</text>
|
||||
<text x="178.56" y="480.24" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">45/85</text>
|
||||
<path d="M246.96,506.16L354.96,506.16L354.96,434.16L246.96,434.16Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(145,181,191);" />
|
||||
<text x="300.96" y="460.08" text-anchor="middle" fill="rgb(145,181,191)" dominant-baseline="central">Warn</text>
|
||||
<text x="300.96" y="480.24" text-anchor="middle" fill="rgb(145,181,191)" dominant-baseline="central">#91b5bf</text>
|
||||
<path d="M2.16,592.56L110.16,592.56L110.16,520.56L2.16,520.56Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(137,49,97);" />
|
||||
<text x="56.16" y="546.48" text-anchor="middle" fill="rgb(137,49,97)" dominant-baseline="central">Purple</text>
|
||||
<text x="56.16" y="566.64" text-anchor="middle" fill="rgb(137,49,97)" dominant-baseline="central">#893161</text>
|
||||
<path d="M124.56,592.56L232.56,592.56L232.56,520.56L124.56,520.56Z" style="fill:rgb(137,49,97);stroke-width:2.16;stroke:rgb(12,9,6);" />
|
||||
<text x="178.56" y="546.48" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H: 68</text>
|
||||
<text x="178.56" y="566.64" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">45/85</text>
|
||||
<path d="M246.96,592.56L354.96,592.56L354.96,520.56L246.96,520.56Z" style="fill:rgb(12,9,6);stroke-width:2.16;stroke:rgb(153,122,139);" />
|
||||
<text x="300.96" y="546.48" text-anchor="middle" fill="rgb(153,122,139)" dominant-baseline="central">Warn</text>
|
||||
<text x="300.96" y="566.64" text-anchor="middle" fill="rgb(153,122,139)" dominant-baseline="central">#997a8b</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.5 KiB |
57
ha-theme-grays.svg
Normal file
57
ha-theme-grays.svg
Normal file
|
@ -0,0 +1,57 @@
|
|||
<svg xmlns='http://www.w3.org/2000/svg' class="pikchr" viewBox="0 0 451.526 306.72">
|
||||
<path d="M2.16,52.56L151.229,52.56L151.229,2.16L2.16,2.16Z" style="fill:rgb(242,241,239);stroke-width:1.4472;stroke:rgb(12,9,6);" />
|
||||
<text x="76.6944" y="17.28" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H:30 S:1 V:95%</text>
|
||||
<text x="76.6944" y="37.44" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">#f2f1ef</text>
|
||||
<path d="M151.229,52.56L300.298,52.56L300.298,2.16L151.229,2.16Z" style="fill:rgb(229,228,227);stroke-width:0.969624;stroke:rgb(12,9,6);" />
|
||||
<text x="225.763" y="17.28" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H:30 S:1 V:90%</text>
|
||||
<text x="225.763" y="37.44" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">#e5e4e3</text>
|
||||
<path d="M300.298,52.56L449.366,52.56L449.366,2.16L300.298,2.16Z" style="fill:rgb(216,215,214);stroke-width:0.649648;stroke:rgb(12,9,6);" />
|
||||
<text x="374.832" y="17.28" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H:30 S:1 V:85%</text>
|
||||
<text x="374.832" y="37.44" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">#d8d7d6</text>
|
||||
<path d="M2.16,102.96L151.229,102.96L151.229,52.56L2.16,52.56Z" style="fill:rgb(204,201,199);stroke-width:0.435264;stroke:rgb(12,9,6);" />
|
||||
<text x="76.6944" y="67.68" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H:30 S:2 V:80%</text>
|
||||
<text x="76.6944" y="87.84" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">#ccc9c7</text>
|
||||
<path d="M151.229,102.96L300.298,102.96L300.298,52.56L151.229,52.56Z" style="fill:rgb(191,189,187);stroke-width:0.291627;stroke:rgb(12,9,6);" />
|
||||
<text x="225.763" y="67.68" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H:30 S:2 V:75%</text>
|
||||
<text x="225.763" y="87.84" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">#bfbdbb</text>
|
||||
<path d="M300.298,102.96L449.366,102.96L449.366,52.56L300.298,52.56Z" style="fill:rgb(178,175,173);stroke-width:0.19539;stroke:rgb(12,9,6);" />
|
||||
<text x="374.832" y="67.68" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H:30 S:3 V:70%</text>
|
||||
<text x="374.832" y="87.84" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">#b2afad</text>
|
||||
<path d="M2.16,153.36L151.229,153.36L151.229,102.96L2.16,102.96Z" style="fill:rgb(166,163,160);stroke-width:0.130911;stroke:rgb(12,9,6);" />
|
||||
<text x="76.6944" y="118.08" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H:30 S:4 V:65%</text>
|
||||
<text x="76.6944" y="138.24" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">#a6a3a0</text>
|
||||
<path d="M151.229,153.36L300.298,153.36L300.298,102.96L151.229,102.96Z" style="fill:rgb(153,148,145);stroke-width:0.0877106;stroke:rgb(12,9,6);" />
|
||||
<text x="225.763" y="118.08" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H:30 S:5 V:60%</text>
|
||||
<text x="225.763" y="138.24" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">#999491</text>
|
||||
<path d="M300.298,153.36L449.366,153.36L449.366,102.96L300.298,102.96Z" style="fill:rgb(140,136,131);stroke-width:0.0587661;stroke:rgb(12,9,6);" />
|
||||
<text x="374.832" y="118.08" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">H:30 S:6 V:55%</text>
|
||||
<text x="374.832" y="138.24" text-anchor="middle" fill="rgb(12,9,6)" dominant-baseline="central">#8c8883</text>
|
||||
<path d="M2.16,203.76L151.229,203.76L151.229,153.36L2.16,153.36Z" style="fill:rgb(127,122,118);stroke-width:0.0393733;stroke:rgb(242,241,239);" />
|
||||
<text x="76.6944" y="168.48" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">H:30 S:7 V:50%</text>
|
||||
<text x="76.6944" y="188.64" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">#7f7a76</text>
|
||||
<path d="M151.229,203.76L300.298,203.76L300.298,153.36L151.229,153.36Z" style="fill:rgb(114,109,104);stroke-width:0.0263801;stroke:rgb(242,241,239);" />
|
||||
<text x="225.763" y="168.48" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">H:30 S:9 V:45%</text>
|
||||
<text x="225.763" y="188.64" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">#726d68</text>
|
||||
<path d="M300.298,203.76L449.366,203.76L449.366,153.36L300.298,153.36Z" style="fill:rgb(102,97,92);stroke-width:0.0176747;stroke:rgb(242,241,239);" />
|
||||
<text x="374.832" y="168.48" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">H:30 S:10 V:40%</text>
|
||||
<text x="374.832" y="188.64" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">#66615c</text>
|
||||
<path d="M2.16,254.16L151.229,254.16L151.229,203.76L2.16,203.76Z" style="fill:rgb(89,83,78);stroke-width:0.011842;stroke:rgb(242,241,239);" />
|
||||
<text x="76.6944" y="218.88" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">H:30 S:12 V:35%</text>
|
||||
<text x="76.6944" y="239.04" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">#59534e</text>
|
||||
<path d="M151.229,254.16L300.298,254.16L300.298,203.76L151.229,203.76Z" style="fill:rgb(76,70,64);stroke-width:0.00793416;stroke:rgb(242,241,239);" />
|
||||
<text x="225.763" y="218.88" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">H:30 S:16 V:30%</text>
|
||||
<text x="225.763" y="239.04" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">#4c4640</text>
|
||||
<path d="M300.298,254.16L449.366,254.16L449.366,203.76L300.298,203.76Z" style="fill:rgb(63,57,50);stroke-width:0.00531589;stroke:rgb(242,241,239);" />
|
||||
<text x="374.832" y="218.88" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">H:30 S:21 V:25%</text>
|
||||
<text x="374.832" y="239.04" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">#3f3932</text>
|
||||
<path d="M2.16,304.56L151.229,304.56L151.229,254.16L2.16,254.16Z" style="fill:rgb(51,44,38);stroke-width:0.00356164;stroke:rgb(242,241,239);" />
|
||||
<text x="76.6944" y="269.28" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">H:30 S:e5 V:20%</text>
|
||||
<text x="76.6944" y="289.44" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">#332c26</text>
|
||||
<path d="M151.229,304.56L300.298,304.56L300.298,254.16L151.229,254.16Z" style="fill:rgb(38,32,26);stroke-width:0.0023863;stroke:rgb(242,241,239);" />
|
||||
<text x="225.763" y="269.28" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">H:30 S:30 V:15%</text>
|
||||
<text x="225.763" y="289.44" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">#26201a</text>
|
||||
<path d="M300.298,304.56L449.366,304.56L449.366,254.16L300.298,254.16Z" style="fill:rgb(25,19,13);stroke-width:0.00159882;stroke:rgb(242,241,239);" />
|
||||
<text x="374.832" y="269.28" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">H:30 S:48 V:10%</text>
|
||||
<text x="374.832" y="289.44" text-anchor="middle" fill="rgb(242,241,239)" dominant-baseline="central">#19130d</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.9 KiB |
471
ha-theme.org
Normal file
471
ha-theme.org
Normal file
|
@ -0,0 +1,471 @@
|
|||
#+title: Hamacs Color Theme
|
||||
#+author: Howard Abrams
|
||||
#+date: 2024-06-18
|
||||
#+filetags: emacs hamacs
|
||||
#+lastmod: [2024-11-22 Fri]
|
||||
|
||||
A literate programming file for defining a warm, autumn, but subtle color theme for Emacs.
|
||||
|
||||
#+begin_src emacs-lisp :exports none
|
||||
;;; hamacs-theme --- A warm, subtle Emacs theme -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; © 2024 Howard Abrams
|
||||
;; Licensed under a Creative Commons Attribution 4.0 International License.
|
||||
;; See http://creativecommons.org/licenses/by/4.0/
|
||||
;;
|
||||
;; Author: Howard Abrams <http://gitlab.com/howardabrams>
|
||||
;; Maintainer: Howard Abrams
|
||||
;; Created: June 18, 2024
|
||||
;;
|
||||
;; While obvious, GNU Emacs does not include this file or project.
|
||||
;;
|
||||
;; *NB:* Do not edit this file. Instead, edit the original literate file at:
|
||||
;; /home/howard/other/hamacs/ha-theme.org
|
||||
;; And tangle the file to recreate this one.
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; These color themes are designed for use with Emacs' built-in
|
||||
;; theme support in Emacs 24. However, they also work with older Emacs
|
||||
;; versions, in which case color-theme.el is required.
|
||||
;;
|
||||
;; Usage:
|
||||
;;
|
||||
;; If your Emacs has the `load-theme' command, you can use it to
|
||||
;; activate one of these themes programatically, or use
|
||||
;; `customize-themes' to select a theme interactively.
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(require 'color)
|
||||
|
||||
(eval-when-compile (require 'ansi-color))
|
||||
(declare-function color-theme-install "color-theme")
|
||||
#+end_src
|
||||
* Subtle Warm Colors
|
||||
I’ve decided that I need to make my own theme. I realize that I like the warm tones of [[https://monokai.com/][monokai]] or [[https://github.com/crmsnbleyd/flexoki-emacs-theme][flexoki]], but both are a wee bit garish and visually jarring, and I prefer the subtle color variations of [[https://github.com/ianyepan/wilmersdorf-emacs-theme][wilmersdorf]], but would like to warm that cool color palette.
|
||||
|
||||
My goals are:
|
||||
- Warm tones from an Autumn palette, so…
|
||||
- White as cream, and Black as a dark brown
|
||||
- Subtle colors, as I don’t want to look at a garish screen
|
||||
- Contrast should be high between foreground and background
|
||||
|
||||
Consider this theme /drab/? That is the beauty of themes. Everyone can make their own.
|
||||
|
||||
** Warm Grays
|
||||
The codes for grays are hex numbers with equal values of red, green and blue, for instance, =#888888=. To /warm/ a gray, we need to add a bit more green, and a bit more than that of red. I notice, the closer to white you go, the less of that “more” you need. Otherwise, I end up with dark brown and beige.
|
||||
|
||||
I came up with a pattern palette: For the darkest gray, assume =10= for the blue, and start with /15/ shades more for the red, and /7/ more shades for the green. Then, for each step towards white, decrease the red by one, and the green, by 1/2. See the following table:
|
||||
|
||||
| #101010 | → | 1f1710 |
|
||||
| #202020 | → | 2e2720 |
|
||||
| #303030 | → | 3d3630 |
|
||||
| #404040 | → | 4c4640 |
|
||||
| #505050 | → | 5b5550 |
|
||||
| #606060 | → | 6a6560 |
|
||||
| #707070 | → | 797470 |
|
||||
| #808080 | → | 888480 |
|
||||
| #909090 | → | 979390 |
|
||||
| #a0a0a0 | → | a6a3a0 |
|
||||
| #b0b0b0 | → | b5b2b0 |
|
||||
| #c0c0c0 | → | c4c2c0 |
|
||||
| #d0d0d0 | → | d3d1d0 |
|
||||
| #e0e0e0 | → | e2e1e0 |
|
||||
|
||||
Actually, using the HSV scale (hue, saturation and value, where /value/ is brightness). The /hue/ would be a nice red-orange color, around =30=, and the saturation would /start/ as =1=, but increase as we get darker, because we can increase the color saturation the closer to black we get. We can create 20 shades of warm gray:
|
||||
|
||||
#+begin_src pikchr :results file :file ha-theme-grays.svg :exports results
|
||||
R1: box "H:30 S:1 V:95%" "#f2f1ef" fit color 0x0c0906 thin fill 0xf2f1ef
|
||||
box "H:30 S:1 V:90%" "#e5e4e3" same color 0x0c0906 thin fill 0xe5e4e3
|
||||
box "H:30 S:1 V:85%" "#d8d7d6" same color 0x0c0906 thin fill 0xd8d7d6
|
||||
R2: box "H:30 S:2 V:80%" "#ccc9c7" same color 0x0c0906 thin fill 0xccc9c7 with .n at 0 below R1.s
|
||||
box "H:30 S:2 V:75%" "#bfbdbb" same color 0x0c0906 thin fill 0xbfbdbb
|
||||
box "H:30 S:3 V:70%" "#b2afad" same color 0x0c0906 thin fill 0xb2afad
|
||||
R3: box "H:30 S:4 V:65%" "#a6a3a0" same color 0x0c0906 thin fill 0xa6a3a0 with .n at 0 below R2.s
|
||||
box "H:30 S:5 V:60%" "#999491" same color 0x0c0906 thin fill 0x999491
|
||||
box "H:30 S:6 V:55%" "#8c8883" same color 0x0c0906 thin fill 0x8c8883
|
||||
R4: box "H:30 S:7 V:50%" "#7f7a76" same color 0xf2f1ef thin fill 0x7f7a76 with .n at 0 below R3.s
|
||||
box "H:30 S:9 V:45%" "#726d68" same color 0xf2f1ef thin fill 0x726d68
|
||||
box "H:30 S:10 V:40%" "#66615c" same color 0xf2f1ef thin fill 0x66615c
|
||||
R5: box "H:30 S:12 V:35%" "#59534e" same color 0xf2f1ef thin fill 0x59534e with .n at 0 below R4.s
|
||||
box "H:30 S:16 V:30%" "#4c4640" same color 0xf2f1ef thin fill 0x4c4640
|
||||
box "H:30 S:21 V:25%" "#3f3932" same color 0xf2f1ef thin fill 0x3f3932
|
||||
R6: box "H:30 S:e5 V:20%" "#332c26" same color 0xf2f1ef thin fill 0x332c26 with .n at 0 below R5.s
|
||||
box "H:30 S:30 V:15%" "#26201a" same color 0xf2f1ef thin fill 0x26201a
|
||||
box "H:30 S:48 V:10%" "#19130d" same color 0xf2f1ef thin fill 0x19130d
|
||||
# box "H:30 S:75 V:5%" "#0c0703" fit color 0xf2f1ef thin fill 0x0c0703
|
||||
#+end_src
|
||||
[[file:ha-theme-grays.svg]]
|
||||
|
||||
I can encapsulate those values in an
|
||||
|
||||
#+NAME: grays
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
("gray-95" . "#f9f8f7")
|
||||
("gray-90" . "#f2f1ef")
|
||||
("gray-85" . "#e5e4e3")
|
||||
("gray-80" . "#d8d7d6")
|
||||
("gray-75" . "#ccc9c7")
|
||||
("gray-70" . "#bfbdbb")
|
||||
("gray-65" . "#b2afad")
|
||||
("gray-60" . "#a6a3a0")
|
||||
("gray-55" . "#999491")
|
||||
("gray-50" . "#8c8883")
|
||||
("gray-45" . "#7f7a76")
|
||||
("gray-40" . "#726d68")
|
||||
("gray-35" . "#66615c")
|
||||
("gray-30" . "#59534e")
|
||||
("gray-25" . "#4c4640")
|
||||
("gray-20" . "#3f3932")
|
||||
("gray-15" . "#332c26")
|
||||
("gray-10" . "#26201a")
|
||||
("gray-05" . "#19130d")
|
||||
("gray-00" . "#0c0703")
|
||||
#+END_SRC
|
||||
|
||||
In Emacs way of displaying the colors?
|
||||
|
||||
|
||||
** Subtle Colors
|
||||
With this knowledge of /saturation/ vs. darkness /value/, I can collect /warm/ colors I like (think autumn), and then /desaturate/ them while still keeping a high contrast, e.g. closer to white and black.
|
||||
|
||||
#+begin_src pikchr :results file :file ha-theme-colors.svg :exports results
|
||||
Red: box fit fill 0x0c0906 "Red" "#860116" color 0x860116
|
||||
box same fill 0x860116 "H: 351" "25/85" color 0x0c0906 with .w at .1 right of previous.e
|
||||
box same fill 0x0c0906 "Red" "#d8a2aa" color 0xd8a2aa with .w at .1 right of previous.e
|
||||
|
||||
Org: box fit fill 0x0c0906 "Orange" "#ce5f15" color 0xce5f15 with .n at .1 below Red.s
|
||||
box same fill 0xce5f15 "H: 24" "25/85" color 0x0c0906 with .w at .1 right of previous.e
|
||||
box same fill 0x0c0906 "Warn" "#d89e77" color 0xd89e77 with .w at .1 right of previous.e
|
||||
|
||||
Ylw: box fit fill 0x0c0906 "Yellow" "#f9b419" color 0xf9b419 with .n at .1 below Org.s
|
||||
box same fill 0xf9b419 "H: 42" "45/85" color 0x0c0906 with .w at .1 right of previous.e
|
||||
box same fill 0x0c0906 "Warn" "#d8bb77" color 0xd8b8a2 with .w at .1 right of previous.e
|
||||
|
||||
Gr1: box fit fill 0x0c0906 "Green" "#899d03" color 0x899d03 with .n at .1 below Ylw.s
|
||||
box same fill 0x899d03 "H: 68" "45/85" color 0x0c0906 with .w at .1 right of previous.e
|
||||
box same fill 0x0c0906 "Warn" "#B3BF8E" color 0xB3BF8E with .w at .1 right of previous.e
|
||||
|
||||
/*
|
||||
Gr2: box fit fill 0x0c0906 "Chew" "#90862d" color 0x90862d with .n at .1 below Gr1.s
|
||||
box same fill 0x90862d "H: 68" "45/85" color 0x0c0906 with .w at .1 right of previous.e
|
||||
box same fill 0x0c0906 "Warn" "#979e6e" color 0x979e6e with .w at .1 right of previous.e
|
||||
,*/
|
||||
Gr2: box fit fill 0x0c0906 "Dk Green" "#55702c" color 0x55702c with .n at .1 below Gr1.s
|
||||
box same fill 0x55702c "H: 68" "45/85" color 0x0c0906 with .w at .1 right of previous.e
|
||||
box same fill 0x0c0906 "Warn" "#979e6e" color 0x979e6e with .w at .1 right of previous.e
|
||||
|
||||
Bl1: box fit fill 0x0c0906 "Blue" "#6f8b93" color 0x6f8b93 with .n at .1 below Gr2.s
|
||||
box same fill 0x6f8b93 "H: 193" "45/85" color 0x0c0906 with .w at .1 right of previous.e
|
||||
box same fill 0x0c0906 "Warn" "#91b5bf" color 0x91b5bf with .w at .1 right of previous.e
|
||||
|
||||
Prp: box fit fill 0x0c0906 "Purple" "#893161" color 0x893161 with .n at .1 below Bl1.s
|
||||
box same fill 0x893161 "H: 68" "45/85" color 0x0c0906 with .w at .1 right of previous.e
|
||||
box same fill 0x0c0906 "Warn" "#997a8b" color 0x997a8b with .w at .1 right of previous.e
|
||||
/* or 625E7B */
|
||||
#+end_src
|
||||
|
||||
[[file:ha-theme-colors.svg]]
|
||||
|
||||
And encapsulate them in a named list:
|
||||
|
||||
#+NAME: colors
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
("red-lt" . "#ffb7a5") ; make this lighter as it is the :symbol
|
||||
("red" . "#d8a2aa")
|
||||
("orange-lt" . "#f2d7a9")
|
||||
("orange-dk" . "#d67c00")
|
||||
("brown-lt" . "#d69333")
|
||||
("yellow-lt" . "#e5e1ce")
|
||||
("almond" . "#ffe3bf")
|
||||
("green-lt" . "#a8b269")
|
||||
("blue-lt" . "#b1d2ee")
|
||||
("blue" . "#81a2be")
|
||||
("slate" . "#708C93") ; Slate? For function name? Change this
|
||||
("purple-dk" . "#b172ff")
|
||||
("purple" . "#cfacf9")
|
||||
("purple-lt" . "#e5d4f9")
|
||||
#+END_SRC
|
||||
|
||||
** Special Settings
|
||||
|
||||
The following lists tweaks to specific settings.
|
||||
|
||||
The default is a high contrast between a 95% and 5% brightest values:
|
||||
|
||||
#+NAME: specials
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
("default-fg" . "#f2e9e1")
|
||||
("default-bg" . "#0c0906")
|
||||
|
||||
("active" . "#801000")
|
||||
("inactive" . "#462200")
|
||||
|
||||
("cursor" . "orange")
|
||||
#+END_SRC
|
||||
|
||||
Our /active/ and /inactive/ is mostly used for the mode-line, and is designed to be noticeable, but not too much?
|
||||
|
||||
The region should be noticeable, but not obnoxious:
|
||||
|
||||
#+NAME: region
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
("region" . "#945703")
|
||||
#+END_SRC
|
||||
|
||||
Org and Markdown inherit from some Emacs faces, so we define a consistent color for [[http://duckduckgo.com][hyperlinks]]:
|
||||
|
||||
#+NAME: links
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
("link-color" . "#87a9b2")
|
||||
("visited-color" . "#c3dee5")
|
||||
#+END_SRC
|
||||
|
||||
** Header Sizes
|
||||
|
||||
For Org, Markdown, and other document formatting, I want a list of header size increases:
|
||||
|
||||
#+NAME: header-sizes
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
("header-1" . 2.2)
|
||||
("header-2" . 1.8)
|
||||
("header-3" . 1.4)
|
||||
("header-4" . 1.2)
|
||||
("header-5" . 1.16)
|
||||
("header-6" . 1.14)
|
||||
("header-7" . 1.12)
|
||||
("header-8" . 1.1)
|
||||
("normal" . 1.0)
|
||||
("small" . 0.9)
|
||||
("smaller" . 0.85)
|
||||
("smallest" . 0.8)
|
||||
#+END_SRC
|
||||
|
||||
Color definition injects the /named/ lists defined above (using Org’s =noweb= feature):
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :noweb yes
|
||||
(defvar hamacs-theme-colors-alist
|
||||
'(
|
||||
<<specials>>
|
||||
<<region>>
|
||||
<<links>>
|
||||
<<region>>
|
||||
<<grays>>
|
||||
<<colors>>
|
||||
<<header-sizes>>
|
||||
)
|
||||
"A list of named colors available in theme.")
|
||||
#+END_SRC
|
||||
* Theme Support
|
||||
Stole the following macro from Zenburn, which converts color references defined above, but only within the body of the macro. Sweet way to trim down a lot of boilerplate:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defmacro hamacs-with-color-variables (&rest body)
|
||||
"`let' bind all colors defined in `hamacs-theme-colors-alist' around BODY.
|
||||
Also bind `class' to ((class color) (min-colors 89))."
|
||||
(declare (indent 0))
|
||||
`(let ((class '((class color) (min-colors 89)))
|
||||
,@(mapcar (lambda (cons)
|
||||
(list (intern (car cons)) (cdr cons)))
|
||||
hamacs-theme-colors-alist))
|
||||
,@body))
|
||||
#+END_SRC
|
||||
|
||||
Can we *see* our colors?
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :noweb yes
|
||||
(defun hamacs-theme-color-show ()
|
||||
"Create a buffer and show off the color choices."
|
||||
(interactive)
|
||||
(switch-to-buffer "*hamacs-theme-colors*")
|
||||
(delete-region (point-min) (point-max))
|
||||
|
||||
(let ((default-fg "#f2e9e1")
|
||||
(default-bg "#0c0906"))
|
||||
(dolist (color-tuple hamacs-theme-colors-alist)
|
||||
(let ((name (car color-tuple))
|
||||
(rgb (cdr color-tuple)))
|
||||
(when (and (stringp rgb) (string-match (rx bos "#") rgb))
|
||||
(insert
|
||||
;; `(default ((t (:foreground ,default-fg :background ,default-bg))))
|
||||
|
||||
;; Color against default dark:
|
||||
(propertize (format " %-15s " name)
|
||||
'face `(:foreground ,rgb :background ,default-bg
|
||||
;; :box (:line-width (2 . 2) :color ,default-fg)
|
||||
))
|
||||
" "
|
||||
;; Color against default fg:
|
||||
(propertize (format " %-15s " name)
|
||||
'face `(:foreground ,rgb :background ,default-fg
|
||||
;; :box (:line-width (2 . 2) :color ,default-bg)
|
||||
))
|
||||
" "
|
||||
;; Color with dark on background
|
||||
(propertize (format " %-15s " name)
|
||||
'face `(:foreground ,default-bg :background ,rgb))
|
||||
" "
|
||||
;; Color with light on background
|
||||
(propertize (format " %-15s " name)
|
||||
'face `(:foreground ,default-fg :background ,rgb))
|
||||
))
|
||||
(newline))))
|
||||
(goto-char (point-min)))
|
||||
#+END_SRC
|
||||
|
||||
* Dark Theme
|
||||
|
||||
Let’s make a /theme/:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(deftheme hamacs ()
|
||||
"A warm, low-contrast theme for GNU Emacs")
|
||||
|
||||
(hamacs-with-color-variables
|
||||
(custom-theme-set-faces
|
||||
'hamacs
|
||||
`(default ((t (:foreground ,default-fg :background ,default-bg))))
|
||||
`(fringe ((t :background ,default-bg)))
|
||||
`(tab-bar ((t :foreground ,default-fg :background ,default-bg)))
|
||||
`(tab-line ((t :foreground ,default-fg :background ,default-bg)))
|
||||
`(window-divider ((t :foreground "black")))
|
||||
`(cursor ((t (:foreground ,gray-10 :background ,cursor))))
|
||||
`(region ((t (:background ,region))))
|
||||
|
||||
`(mode-line ((t (:background ,active :foreground "white"))))
|
||||
`(mode-line-active ((t (:background ,active))))
|
||||
`(mode-line-inactive ((t (:background ,inactive))))
|
||||
|
||||
`(doom-modeline-buffer-path ((t (:foreground ,almond))))
|
||||
`(doom-modeline-buffer-file ((t (:foreground "white" :weight bold))))
|
||||
`(doom-modeline-buffer-major-mode ((t (:foreground ,almond))))
|
||||
`(doom-modeline-info ((t (:foreground ,green-lt))))
|
||||
`(doom-modeline-time ((t (:foreground ,default-fg))))
|
||||
|
||||
`(line-number ((t (:foreground ,gray-50 :background ,gray-10))))
|
||||
`(line-number-current-line ((t (:foreground ,gray-95 :background ,gray-20 :weight ultra-bold))))
|
||||
|
||||
`(header-line ((t (:foreground ,gray-80))))
|
||||
`(help-key-binding ((t (:foreground ,gray-80 :weight ultra-bold))))
|
||||
`(bold ((t (:foreground ,gray-90 :weight ultra-bold))))
|
||||
`(italics ((t (:foreground ,gray-95))))
|
||||
`(bold-italic ((t (:foreground "white"))))
|
||||
|
||||
`(link ((t (:foreground ,link-color))))
|
||||
`(link-visited ((t (:foreground ,visited-color))))
|
||||
|
||||
`(font-lock-comment-face ((t (:foreground ,gray-70))))
|
||||
`(font-lock-comment-delimiter-face ((t (:foreground ,gray-50))))
|
||||
`(font-lock-string-face ((t (:foreground ,yellow-lt))))
|
||||
`(font-lock-doc-face ((t (:foreground ,orange-lt))))
|
||||
`(font-lock-constant-face ((t (:foreground ,orange-lt))))
|
||||
`(font-lock-builtin-face ((t (:foreground ,red-lt))))
|
||||
`(font-lock-keyword-face ((t (:foreground ,green-lt))))
|
||||
`(font-lock-function-name-face ((t (:foreground ,blue))))
|
||||
`(font-lock-property-use-face ((t (:foreground ,blue-lt))))
|
||||
|
||||
`(parenthesis ((t (:foreground ,gray-50))))
|
||||
`(show-paren-match ((t (:foreground ,cursor :weight ultra-bold))))
|
||||
|
||||
`(org-link ((t (:foreground ,link-color))))
|
||||
`(org-code ((t (:foreground ,almond))))
|
||||
`(org-verbatim ((t (:foreground ,gray-95))))
|
||||
|
||||
`(org-block ((t (:background ,gray-10))))
|
||||
`(org-block-begin-line ((t (:foreground ,gray-50 :background ,gray-20 :height ,smaller :extend t))))
|
||||
`(org-block-end-line ((t (:inherit org-block-begin-line :height ,smallest))))
|
||||
|
||||
`(org-document-title ((t (:foreground ,orange-dk))))
|
||||
`(org-document-info ((t (:foreground ,brown-lt))))
|
||||
`(org-meta-line ((t (:foreground ,gray-55))))
|
||||
`(org-drawer ((t (:foreground ,purple-dk :height ,smallest))))
|
||||
`(org-special-keyword ((t (:foreground ,purple :height ,smaller))))
|
||||
`(org-property-value ((t (:foreground ,purple-lt :height ,smaller))))
|
||||
`(org-table ((t (:foreground ,purple-lt))))
|
||||
`(org-quote ((t (:inherit variable-pitch :slant italic :height 0.9))))
|
||||
|
||||
`(org-level-1 ((t (:inherit variable-pitch :foreground ,default-fg :weight bold :height ,header-1))))
|
||||
`(org-level-2 ((t (:inherit variable-pitch :foreground ,default-fg :weight bold :height ,header-2))))
|
||||
`(org-level-3 ((t (:inherit variable-pitch :foreground ,default-fg :weight bold :height ,header-3))))
|
||||
`(org-level-4 ((t (:inherit variable-pitch :foreground ,default-fg :weight bold :height ,header-4))))
|
||||
`(org-level-5 ((t (:inherit variable-pitch :foreground ,default-fg :weight bold :height ,header-5))))
|
||||
`(org-level-6 ((t (:inherit variable-pitch :foreground ,default-fg :weight bold :height ,header-6))))
|
||||
`(org-level-7 ((t (:inherit variable-pitch :foreground ,default-fg :weight bold :height ,header-7))))
|
||||
`(org-level-8 ((t (:inherit variable-pitch :foreground ,default-fg :weight bold :height ,header-8))))
|
||||
|
||||
`(markdown-italic-face ((t (:foreground unspecified))))
|
||||
`(markdown-bold-face ((t (:foreground unspecified))))
|
||||
`(markdown-pre-face ((t (:foreground ,(face-attribute 'org-code :foreground)
|
||||
:family ,(face-attribute 'default :family)))))
|
||||
`(markdown-code-face ((t (:background ,(face-attribute 'org-block :background)))))
|
||||
`(markdown-language-keyword-face ((t (:foreground
|
||||
,(face-attribute 'org-block-begin-line :foreground)))))
|
||||
|
||||
;; Change this:
|
||||
`(markdown-url-face ((t (:foreground ,(face-attribute 'org-link :foreground)))))
|
||||
`(markdown-header-face ((t (:font ,ha-variable-header-font :foreground ,default-fg))))
|
||||
`(markdown-header-face-1 ((t (:inherit org-header-1))))
|
||||
`(markdown-header-face-2 ((t (:inherit org-header-2))))
|
||||
`(markdown-header-face-3 ((t (:inherit org-header-3))))
|
||||
`(markdown-header-face-4 ((t (:inherit org-header-4))))
|
||||
`(markdown-header-face-5 ((t (:inherit org-header-5))))
|
||||
`(markdown-header-face-6 ((t (:inherit org-header-6))))
|
||||
|
||||
`(magit-filename ((t (:foreground ,yellow-lt))))
|
||||
|
||||
`(minibuffer-prompt ((t (:foreground ,orange-lt))))
|
||||
`(vertico-group-separator ((t (:foreground ,gray-45))))
|
||||
`(vertico-group-multiline ((t (:foreground ,gray-45))))
|
||||
`(vertico-group-title ((t (:foreground ,gray-45))))
|
||||
))
|
||||
#+END_SRC
|
||||
|
||||
Let’s see how Org-formatted faces look:
|
||||
- *bold*
|
||||
- /italics/
|
||||
- _underlined_
|
||||
- =verbatim=
|
||||
- ~code, er keys~
|
||||
|
||||
Functions and variables would look like:
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(defun function-name (arg1 arg2)
|
||||
"The doc string is part string and part comment.
|
||||
It references ARG1 and ARG2, but also `other-functions'."
|
||||
(interactive "P")
|
||||
(list "strings not crazy" 2 :keywords-moreso))
|
||||
#+end_src
|
||||
|
||||
And YAML specifically:
|
||||
#+BEGIN_SRC yaml-ts
|
||||
foo:
|
||||
number: 42
|
||||
string: Nothing much
|
||||
quoted_string: "Nothing much"
|
||||
boolean: true
|
||||
multiline: >
|
||||
Here we go with {{ substitutions }} from Jinja/Ansible
|
||||
#+END_SRC
|
||||
|
||||
|
||||
* Technical Artifacts :noexport:
|
||||
|
||||
Let's =provide= a name so we can =require= this file:
|
||||
|
||||
#+begin_src emacs-lisp :exports none
|
||||
(provide 'hamacs-theme)
|
||||
;;; hamacs-theme.el ends here
|
||||
#+end_src
|
||||
|
||||
#+DESCRIPTION: defining a warm, autumn, but subtle color theme for Emacs.
|
||||
|
||||
#+PROPERTY: header-args:sh :tangle no
|
||||
#+PROPERTY: header-args:emacs-lisp :tangle hamacs-theme.el
|
||||
#+PROPERTY: header-args :results none :eval no-export :comments no mkdirp yes
|
||||
|
||||
#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
|
||||
#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
|
||||
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
|
||||
-
|
Loading…
Reference in a new issue