add function my-select-theme
This commit is contained in:
parent
2ee80a0fc4
commit
66a5767ef9
9
init.el
9
init.el
@ -1179,13 +1179,16 @@ Argument FRAMES has the same meaning as for `set-frame-font'"
|
|||||||
(setq my-dark-theme 'apropospriate-dark
|
(setq my-dark-theme 'apropospriate-dark
|
||||||
my-light-theme 'apropospriate-light))
|
my-light-theme 'apropospriate-light))
|
||||||
|
|
||||||
|
(defun my-select-theme (theme)
|
||||||
|
(mapc #'disable-theme custom-enabled-themes)
|
||||||
|
(load-theme theme t)
|
||||||
|
(my-helm-themes-after))
|
||||||
|
|
||||||
(defun my-toggle-theme ()
|
(defun my-toggle-theme ()
|
||||||
"Toggle between dark and light themes"
|
"Toggle between dark and light themes"
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((dark-p (custom-theme-enabled-p my-dark-theme)))
|
(let ((dark-p (custom-theme-enabled-p my-dark-theme)))
|
||||||
(mapc #'disable-theme custom-enabled-themes)
|
(my-select-theme (if dark-p my-light-theme my-dark-theme))))
|
||||||
(load-theme (if dark-p my-light-theme my-dark-theme) t))
|
|
||||||
(my-helm-themes-after))
|
|
||||||
|
|
||||||
(global-set-key (kbd "C-S-<f6>") #'my-toggle-theme)
|
(global-set-key (kbd "C-S-<f6>") #'my-toggle-theme)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user