diff options
author | JSDurand <mmemmew@gmail.com> | 2023-01-06 23:40:47 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-01-06 23:40:47 +0800 |
commit | 5aeb375b59ef4898d9d4525f86c3c2cd49ad5258 (patch) | |
tree | 45b69b44a8f8f83ab0f87c378ec2606000a1f5eb | |
parent | 68ba4a0ae38c898e2a31ec5174bb8d032ea3ae88 (diff) |
theme + eshell: adapt to version 4.
theme.el: Modus-themes now uses a great system for customising
faces, and this change in configuration adapts to that update.
eshell-conf.el: Besides adapting to the new Modus-themes, also
add some visual commands for better display.
-rw-r--r-- | eshell-conf.el | 5 | ||||
-rw-r--r-- | theme.el | 53 |
2 files changed, 33 insertions, 25 deletions
diff --git a/eshell-conf.el b/eshell-conf.el index 12a35b6..e99f037 100644 --- a/eshell-conf.el +++ b/eshell-conf.el @@ -227,7 +227,7 @@ Just for the completeness." (mapconcat (function (lambda (mark) - (concat (propertize mark 'font-lock-face 'modus-themes-mark-symbol) + (concat (propertize mark 'font-lock-face 'modus-themes-mark-sel) (make-string (- max-length (length mark)) #x20) " -> " (file-truename (expand-file-name mark eshell-mark-directory))))) @@ -502,6 +502,9 @@ For example, \"...\" expands into \"../..\"." (add-to-list 'eshell-visual-commands "mpv" nil #'string=) +(add-to-list 'eshell-visual-subcommands + (list "git" "log" "diff" "show" "help")) + ;;; List files after changing directories (setq eshell-list-files-after-cd t) @@ -14,8 +14,8 @@ (set symbol (list ;; borders - ;; (list 'border-mode-line-active 'bg-mode-line-active) - ;; (list 'border-mode-line-inactive 'bg-mode-line-inactive) + (list 'border-mode-line-active 'bg-mode-line-active) + (list 'border-mode-line-inactive 'bg-mode-line-inactive) ;; subtle line numbers (list 'bg-line-number-inactive 'bg-dim) (list 'fg-line-number-inactive 'fg-dim) @@ -108,30 +108,35 @@ ;; To change the mode-line face via a hook. +;; Load the theme so that the macro expansion does not complain. +(modus-themes-load-theme 'modus-vivendi) + (defun durand-custom-face (&rest _args) "Change appearances of some themes." - (modus-themes-with-colors - (custom-set-faces - (list 'mode-line - (list - (list - t - :box (list :line-width 4 - :color bg-mode-line-active - :style 'released-button) - :background bg-mode-line-active - :foreground fg-mode-line-active))) - (list 'mode-line-inactive - (list - (list - t - :box (list :line-width 4 - :color bg-mode-line-inactive - :style 'released-button) - :background bg-mode-line-inactive - :foreground fg-mode-line-inactive)))))) - -(remove-hook 'modus-themes-after-load-theme-hook #'durand-custom-face) + (cond + ((featurep 'modus-themes) + (modus-themes-with-colors + (custom-set-faces + (list 'mode-line + (list + (list + t + :box (list :line-width 4 + :color bg-mode-line-active + :style 'released-button) + :background bg-mode-line-active + :foreground fg-mode-line-active))) + (list 'mode-line-inactive + (list + (list + t + :box (list :line-width 4 + :color bg-mode-line-inactive + :style 'released-button) + :background bg-mode-line-inactive + :foreground fg-mode-line-inactive)))))))) + +(add-hook 'modus-themes-after-load-theme-hook #'durand-custom-face) ;;;; Links ;; Fine, but I cannot set the background color now? |