summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2023-01-09 00:00:50 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2023-01-09 00:00:50 +0100
commitb3759d741fdb13ef8d80b4a5bc17d693c653a2d8 (patch)
tree86e0dc5a9cb516f56d0e5d8067fa63ba719c6674
parent2856305c484c7f29ef9321f70071e8d007950895 (diff)
downloaddotfiles-b3759d741fdb13ef8d80b4a5bc17d693c653a2d8.tar.xz
Switch to personal theme
-rw-r--r--.emacs119
-rw-r--r--.emacs.d/eighters-theme.el3
2 files changed, 6 insertions, 116 deletions
diff --git a/.emacs b/.emacs
index e7e675e..13de5a4 100644
--- a/.emacs
+++ b/.emacs
@@ -34,6 +34,8 @@
(declare (indent 1))
(thread-first
l (seq-union to-add) (seq-difference to-remove)))
+
+(load-theme 'eighters t)
;;; Key bindings.
@@ -343,9 +345,7 @@
'compile)
(let* ((indicator (alist-get 'compilation-in-progress mode-line-modes))
(old-props (text-properties-at 0 (car indicator)))
- (face (if (>= emacs-major-version 28)
- 'modus-themes-intense-yellow
- `(:background ,(face-foreground 'warning))))
+ (face '(:inverse-video t :inherit compilation-mode-line-run))
(new-props (append `(face ,face) old-props))
(icon (my/symbol-as-icon ?⚙)))
(setcar indicator (concat (apply #'propertize icon new-props) " "))))
@@ -640,119 +640,6 @@
:custom
(use-package-always-defer t))
-(defun my/modus<4-config ()
- (setq modus-themes-bold-constructs t
- modus-themes-deuteranopia t
- modus-themes-diffs 'bg-only
- modus-themes-headings '((1 . (variable-pitch 1.2))
- (2 . (variable-pitch 1.15))
- (3 . (variable-pitch 1.1))
- (4 . (variable-pitch 1.05))
- (t . (variable-pitch)))
- modus-themes-italic-constructs t
- modus-themes-mixed-fonts t
- modus-themes-org-blocks 'gray-background
- modus-themes-prompts '(background)
- modus-themes-region '(bg-only)
- modus-themes-variable-pitch-ui t)
- (load-theme 'modus-vivendi))
-
-(defun my/color-hsl-to-rgbhex (h s l)
- (apply
- 'color-rgb-to-hex
- `(,@(color-hsl-to-rgb h s l) 2)))
-
-(defun my/color-hs1-l2 (c1 c2)
- (pcase-let ((`(,h1 ,s1 _) (apply 'color-rgb-to-hsl
- (color-name-to-rgb c1)))
- (`(_ _ ,l2) (apply 'color-rgb-to-hsl
- (color-name-to-rgb c2))))
- (message "hue %.3f with s %.3f l %.3f" h1 s1 l2)
- (apply 'color-rgb-to-hex
- `(,@(color-hsl-to-rgb h1 s1 l2) 2))))
-
-(defun my/modus-rgb (key palette)
- (let ((value (car (alist-get key palette))))
- (if (stringp value)
- value
- (car (alist-get value palette)))))
-
-(defun my/modus>=4-tune-faces ()
- (with-eval-after-load 'gnus
- (set-face-foreground 'gnus-summary-normal-ancient "#989898")) ; ≡ -read
- (with-eval-after-load 'magit
- (set-face-foreground 'magit-blame-highlight "#989898") ; ≡ shadow
- (set-face-background 'magit-blame-highlight "#1e1e1e"))) ; ≡ bg-dim
-
-(defun my/modus>=4-config ()
- (require-theme 'modus-themes)
- (setq modus-themes-bold-constructs t
- modus-themes-italic-constructs t
- modus-themes-mixed-fonts t
- modus-themes-variable-pitch-ui t
- modus-themes-headings '((1 . (variable-pitch 1.2))
- (2 . (variable-pitch 1.15))
- (3 . (variable-pitch 1.1))
- (4 . (variable-pitch 1.05))
- (t . (variable-pitch)))
- modus-themes-org-blocks 'gray-background)
- (setq modus-vivendi-palette-overrides
- ;; THE LIGHT!!! IT BURNS USSSS!!! 🧌
- '((bg-dim "#0f0f0f") ; magit-diff-context-highlight, org-block
- (bg-active "#303030")
- (bg-inactive "#1e1e1e")
- (bg-mode-line-active "#303030")
- (bg-mode-line-inactive "#1e1e1e")
- (bg-region "#242424")
- ;; Original hues & saturations, much lower light.
- (bg-hl-line "#191d26")
- (bg-completion "#192546")
- (bg-hover "#002f43")
- ;; Darkened by 50%.
- (bg-red-subtle "#3b0919")
- (bg-green-subtle "#002719")
- (bg-yellow-subtle "#2c2600") ; eldoc-highlight-function-argument
- (bg-blue-subtle "#151648")
- (bg-magenta-subtle "#331c39")
- (bg-cyan-subtle "#00263c")
- ;; Old deuteranopia diff colors (more or less) + darker backgrounds.
- (bg-removed-faint "#140000") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.04)
- (bg-removed "#280000") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.08)
- (bg-removed-refine "#510000") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.16)
- (bg-removed-intense "#a30000") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.32)
- (fg-removed "#fecccc") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.90)
- (fg-removed-intense "#ff3232") ; (my/color-hsl-to-rgbhex 0.00 1.0 0.60)
- (bg-added-faint "#000914") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.04)
- (bg-added "#001228") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.08)
- (bg-added-refine "#002551") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.16)
- (bg-added-intense "#004ba3") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.32)
- (fg-added "#cce3fe") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.90)
- (fg-added-intense "#3290ff") ; (my/color-hsl-to-rgbhex 0.59 1.0 0.60)
- (bg-changed-faint "#0b0014") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.04)
- (bg-changed "#160028") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.08)
- (bg-changed-refine "#2d0051") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.16)
- (bg-changed-intense "#513a00") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.16)
- (fg-changed "#fef0cc") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.90)
- (fg-changed-intense "#ffc532") ; (my/color-hsl-to-rgbhex 0.12 1.0 0.60)
- ;; Tweaks unrelated to dimming backgrounds:
- (fg-region unspecified)))
- (load-theme 'modus-vivendi)
- (my/modus>=4-tune-faces))
-
-(use-package emacs
- :when (>= emacs-major-version 28)
- ;; `(modus-themes) Sample configuration with and without
- ;; use-package' recommends setting options in :init and loading the
- ;; theme in :config; unfortunately it's not possible to access the
- ;; palettes without loading the themes AFAICT, so do everything in
- ;; :config.
- :config
- (cond
- ((memq 'modus-vivendi-deuteranopia (custom-available-themes))
- (my/modus>=4-config))
- (t
- (my/modus<4-config))))
-
(use-package package
:custom
(package-selected-packages
diff --git a/.emacs.d/eighters-theme.el b/.emacs.d/eighters-theme.el
index b5d0aac..b6a83cd 100644
--- a/.emacs.d/eighters-theme.el
+++ b/.emacs.d/eighters-theme.el
@@ -69,6 +69,9 @@
(mapcar 'cadr eighters-palette)
"*Eighters palette*"))
+(defun eighters-color (symbol)
+ (car (alist-get symbol eighters-palette)))
+
(defface eighters-button nil
"Face for elements that can be \"pushed\" with RET.")
(defface eighters-date nil