Change the default theme from dracula to base16 based theme

This commit is contained in:
Sameer Rahmani 2024-04-07 14:12:37 +01:00
parent 1d674392f8
commit c8fee15422
Signed by: lxsameer
GPG Key ID: 8741FACBF412FFA5
4 changed files with 47 additions and 18 deletions

View File

@ -121,6 +121,7 @@
nerd-icons
forge
svg-tag-mode
base16-theme
consult)
(provide 'fg42/deps)

View File

@ -24,11 +24,18 @@
(eval-when-compile
(require 'fpkg))
(require 'fg42/utils)
(defvar fg42/modeline-views nil
"A list of Noether views to use for modeline.")
(defvar fg42/modeline-active-face nil
"Override the active modeline face via this var.")
(defvar fg42/modeline-inactive-face nil
"Override the inactive modeline face via this var.")
(defface fg42/-disabled-modeline-active-border
'((t
:background "#bd93f9" :height 0.1 :box nil))
@ -53,13 +60,18 @@ to Emacs modeline."
:config
(require 'noether-views)
(let ((active-border (get-base16-color-or :base0A "#bd93f9"))
(inactive-border (get-base16-color-or :base04 "#44475a")))
(set-face-attribute 'fg42/-disabled-modeline-active-border nil :background active-border)
(set-face-attribute 'fg42/-disabled-modeline-dective-border nil :background inactive-border))
;; Disable the default modeline
(setq-default mode-line-format "")
(let ((face-remaps (default-value 'face-remapping-alist)))
(setf (alist-get 'mode-line face-remaps)
'fg42/-disabled-modeline-active-border
(if fg42/modeline-active-face fg42/modeline-active-face 'fg42/-disabled-modeline-active-border)
(alist-get 'mode-line-inactive face-remaps)
'fg42/-disabled-modeline-dective-border
(if fg42/modeline-inactive-face fg42/modeline-inactive-face 'fg42/-disabled-modeline-dective-border)
(default-value 'face-remapping-alist) face-remaps))
(setq-default noether-views (or fg42/modeline-views

View File

@ -61,22 +61,22 @@ It executes way before the rest of the cubes.")
,@body)))))
(use-theme! dracula-theme
:init
(fg42/setup-theme
(require 'dracula-theme)
(load-theme 'dracula t)
(custom-theme-set-faces
'dracula
'(match ((t (:background "#44475a"))))
'(all-the-icons-lgreen ((t (:background "#bd93f9"))))
'(all-the-icons-faicon ((t (:background "#bd93f9"))))
'(font-lock-comment-face ((t (:foreground "#8B9298"))))
;; This fixes lsp-ui-sideline issue
'(lsp-ui-sideline-current-symbol ((t (:line-width -1 :foreground "#bd93f9"))))
'(font-lock-comment-delimiter-face ((t (:foreground "#5B6268")))))
(enable-theme 'dracula)
(set-face-attribute 'region nil :background "#888")))
;; (use-theme! dracula-theme
;; :init
;; (fg42/setup-theme
;; (require 'dracula-theme)
;; (load-theme 'dracula t)
;; (custom-theme-set-faces
;; 'dracula
;; '(match ((t (:background "#44475a"))))
;; '(all-the-icons-lgreen ((t (:background "#bd93f9"))))
;; '(all-the-icons-faicon ((t (:background "#bd93f9"))))
;; '(font-lock-comment-face ((t (:foreground "#8B9298"))))
;; ;; This fixes lsp-ui-sideline issue
;; '(lsp-ui-sideline-current-symbol ((t (:line-width -1 :foreground "#bd93f9"))))
;; '(font-lock-comment-delimiter-face ((t (:foreground "#5B6268")))))
;; (enable-theme 'dracula)
;; (set-face-attribute 'region nil :background "#888")))
(use-theme! badwolf-theme
@ -88,5 +88,11 @@ It executes way before the rest of the cubes.")
(enable-theme 'badwolf)))
(use! base16-theme
"Load base16 based themes in FG42."
:config
(load-theme 'base16-eighties t))
(provide 'fg42/themes)
;;; themes.el ends here

View File

@ -196,5 +196,15 @@ is non-nil value it means that the function can be called interactively."
(fg42/log "INFO" args))
(defun get-base16-color-or (color-name default)
"Return the color for COLOR-NAME if a base16 theme is loade otherwise DEFAULT."
(let* ((theme (car custom-enabled-themes))
(theme-sym (intern (format "%s-theme-colors" theme))))
(if (boundp theme-sym)
(or (eval `(plist-get ,theme-sym ,color-name)) default)
default)))
(provide 'fg42/utils)
;;; utils.el ends here