use lupan-themes if available
This commit is contained in:
parent
c219a76afa
commit
da4836ce93
22
init.el
22
init.el
@ -1170,8 +1170,19 @@ Argument FRAMES has the same meaning as for `set-frame-font'"
|
|||||||
|
|
||||||
;;; ### Toggle between dark and light themes with a key ###
|
;;; ### Toggle between dark and light themes with a key ###
|
||||||
|
|
||||||
(setq my-dark-theme 'apropospriate-dark
|
;;; Toggle between [my own dark and light
|
||||||
my-light-theme 'apropospriate-light)
|
;;; themes](https://lupan.pl/lupan-themes/) if available in
|
||||||
|
;;; `~/.emacs.d/lupan-themes` otherwise falls back to another themes.
|
||||||
|
|
||||||
|
(let ((path (expand-file-name "~/.emacs.d/lupan-themes")))
|
||||||
|
(when (file-accessible-directory-p path)
|
||||||
|
(add-to-list 'load-path path t)))
|
||||||
|
|
||||||
|
(if (require 'lupan-themes nil t)
|
||||||
|
(setq my-dark-theme 'lupan-dark
|
||||||
|
my-light-theme 'lupan-light)
|
||||||
|
(setq my-dark-theme 'apropospriate-dark
|
||||||
|
my-light-theme 'apropospriate-light))
|
||||||
|
|
||||||
(defun my-toggle-theme ()
|
(defun my-toggle-theme ()
|
||||||
"Toggle between dark and light themes"
|
"Toggle between dark and light themes"
|
||||||
@ -1184,8 +1195,11 @@ Argument FRAMES has the same meaning as for `set-frame-font'"
|
|||||||
(global-set-key (kbd "C-S-<f6>") #'my-toggle-theme)
|
(global-set-key (kbd "C-S-<f6>") #'my-toggle-theme)
|
||||||
|
|
||||||
(use-package apropospriate-theme
|
(use-package apropospriate-theme
|
||||||
:config
|
:defer)
|
||||||
(my-toggle-theme))
|
|
||||||
|
(if (or (require 'lupan-themes nil t)
|
||||||
|
(require 'apropospriate-theme nil t))
|
||||||
|
(my-toggle-theme))
|
||||||
|
|
||||||
(defun my-frame-setup-fn (&optional frame)
|
(defun my-frame-setup-fn (&optional frame)
|
||||||
(unless (display-graphic-p frame)
|
(unless (display-graphic-p frame)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user