Emacs: customize my svg-mode-line-theme
This commit is contained in:
parent
937e273292
commit
07586eb43b
1 changed files with 22 additions and 1 deletions
|
@ -433,10 +433,31 @@
|
|||
a theme.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun oni:smt/minor-mode-indicator-text (widget)
|
||||
(let ((text (concat
|
||||
(when (bound-and-true-p auto-complete-mode) "C")
|
||||
(when (bound-and-true-p auto-fill-mode) "F")
|
||||
(when (bound-and-true-p eldoc-mode) "D"))))
|
||||
(if (plusp (length text))
|
||||
(concat " " text)
|
||||
"")))
|
||||
|
||||
(smt/deftheme yoshi
|
||||
:prototype 'black-crystal
|
||||
:local-widgets
|
||||
(lambda (theme)
|
||||
(let ((parent-local-widgets
|
||||
(smt/t-local-widgets (smt/t-prototype theme))))
|
||||
(append (list (cons 'minor-modes
|
||||
(smt/make-widget
|
||||
:prototye 'minor-modes
|
||||
:text 'oni:smt/minor-mode-indicator-text)))
|
||||
parent-local-widgets))))
|
||||
|
||||
(defun oni:enable-svg-mode-line-theme ()
|
||||
"Enable `svg-mode-line-theme' and select a theme."
|
||||
(smt/enable)
|
||||
(smt/set-theme 'black-crystal))
|
||||
(smt/set-theme 'yoshi))
|
||||
|
||||
(add-hook 'emacs-startup-hook 'oni:enable-svg-mode-line-theme)
|
||||
#+END_SRC
|
||||
|
|
Loading…
Reference in a new issue