.emacs.d/lisp/init-themes.el

47 lines
1.4 KiB
EmacsLisp
Raw Normal View History

2024-09-06 11:42:11 +02:00
;;; init-themes.el --- Defaults for themes -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(require-package 'catppuccin-theme)
;; Don't prompt to confirm theme safety. This avoids problems with
;; first-time startup on Emacs > 26.3.
(setq custom-safe-themes t)
;; If you don't customize it, this is the theme you get.
(setq-default custom-enabled-themes '(catppuccin))
;; Toggle between light and dark
(defun light ()
"Activate a light color theme."
(interactive)
(setq custom-enabled-themes '(modus-operandi))
(reapply-themes))
(defun dark ()
"Activate a dark color theme."
(interactive)
(setq custom-enabled-themes '(modus-vivendi))
(reapply-themes))
(when (maybe-require-package 'dimmer)
(setq-default dimmer-fraction 0.15)
(setq dimmer-buffer-exclusion-regexps '(" \\*\\(LV\\|transient\\)\\*"
"^ \\*.*posframe.*buffer.*\\*$"
"^\\*Minibuf-[0-9]+\\*"
"^.\\*which-key\\*$"
"^.\\*Echo.*\\*"))
(add-hook 'after-init-hook 'dimmer-mode)
(with-eval-after-load 'dimmer
(advice-add 'frame-set-background-mode :after (lambda (&rest args) (dimmer-process-all))))
)
(provide 'init-themes)
;;; init-themes.el ends here