mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
emacs: ef-themes workaround
This commit is contained in:
parent
6328304e70
commit
cbd5ff7b0c
2 changed files with 13 additions and 8 deletions
|
|
@ -138,8 +138,10 @@
|
||||||
|
|
||||||
(defun my/modus-get-base (color)
|
(defun my/modus-get-base (color)
|
||||||
(let ((base-value (string-to-number (substring (symbol-name color) 4 5)))
|
(let ((base-value (string-to-number (substring (symbol-name color) 4 5)))
|
||||||
(base-start (cadr (assoc 'bg-main (modus-themes-get-theme-palette))))
|
(base-start (cadr (assoc 'bg-main (modus-themes-get-theme-palette
|
||||||
(base-end (cadr (assoc 'fg-dim (modus-themes-get-theme-palette)))))
|
(or (my/modus-p) (my/ef-p))))))
|
||||||
|
(base-end (cadr (assoc 'fg-dim (modus-themes-get-theme-palette
|
||||||
|
(or (my/modus-p) (my/ef-p)))))))
|
||||||
(nth base-value (ct-gradient 9 base-start base-end t))))
|
(nth base-value (ct-gradient 9 base-start base-end t))))
|
||||||
|
|
||||||
(defun my/prot-color (color palette)
|
(defun my/prot-color (color palette)
|
||||||
|
|
@ -179,10 +181,10 @@
|
||||||
(t (cadr (assoc color palette))))))
|
(t (cadr (assoc color palette))))))
|
||||||
|
|
||||||
(defun my/modus-color (color)
|
(defun my/modus-color (color)
|
||||||
(my/prot-color color (modus-themes-get-theme-palette)))
|
(my/prot-color color (modus-themes-get-theme-palette (my/modus-p))))
|
||||||
|
|
||||||
(defun my/ef-color (color)
|
(defun my/ef-color (color)
|
||||||
(my/prot-color color (modus-themes-get-theme-palette)))
|
(my/prot-color color (modus-themes-get-theme-palette (my/ef-p))))
|
||||||
|
|
||||||
(defconst my/test-colors-list
|
(defconst my/test-colors-list
|
||||||
'(black red green yellow blue magenta cyan white light-black
|
'(black red green yellow blue magenta cyan white light-black
|
||||||
|
|
@ -276,6 +278,7 @@
|
||||||
(eq enabled-theme theme)))
|
(eq enabled-theme theme)))
|
||||||
do (disable-theme enabled-theme))
|
do (disable-theme enabled-theme))
|
||||||
(load-theme theme t)
|
(load-theme theme t)
|
||||||
|
(my/update-my-theme)
|
||||||
(when current-prefix-arg
|
(when current-prefix-arg
|
||||||
(my/regenerate-desktop)))
|
(my/regenerate-desktop)))
|
||||||
|
|
||||||
|
|
|
||||||
10
Emacs.org
10
Emacs.org
|
|
@ -2436,8 +2436,10 @@ And the same for =modus-themes=. =my/modus-color= has to accept the same argumen
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun my/modus-get-base (color)
|
(defun my/modus-get-base (color)
|
||||||
(let ((base-value (string-to-number (substring (symbol-name color) 4 5)))
|
(let ((base-value (string-to-number (substring (symbol-name color) 4 5)))
|
||||||
(base-start (cadr (assoc 'bg-main (modus-themes-get-theme-palette))))
|
(base-start (cadr (assoc 'bg-main (modus-themes-get-theme-palette
|
||||||
(base-end (cadr (assoc 'fg-dim (modus-themes-get-theme-palette)))))
|
(or (my/modus-p) (my/ef-p))))))
|
||||||
|
(base-end (cadr (assoc 'fg-dim (modus-themes-get-theme-palette
|
||||||
|
(or (my/modus-p) (my/ef-p)))))))
|
||||||
(nth base-value (ct-gradient 9 base-start base-end t))))
|
(nth base-value (ct-gradient 9 base-start base-end t))))
|
||||||
|
|
||||||
(defun my/prot-color (color palette)
|
(defun my/prot-color (color palette)
|
||||||
|
|
@ -2477,10 +2479,10 @@ And the same for =modus-themes=. =my/modus-color= has to accept the same argumen
|
||||||
(t (cadr (assoc color palette))))))
|
(t (cadr (assoc color palette))))))
|
||||||
|
|
||||||
(defun my/modus-color (color)
|
(defun my/modus-color (color)
|
||||||
(my/prot-color color (modus-themes-get-theme-palette)))
|
(my/prot-color color (modus-themes-get-theme-palette (my/modus-p))))
|
||||||
|
|
||||||
(defun my/ef-color (color)
|
(defun my/ef-color (color)
|
||||||
(my/prot-color color (modus-themes-get-theme-palette)))
|
(my/prot-color color (modus-themes-get-theme-palette (my/ef-p))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Test the three functions.
|
Test the three functions.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue