.emacs.d/lisp/init-themes.el
2024-09-06 11:42:11 +02:00

46 lines
1.4 KiB
EmacsLisp
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;; 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