mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
commit
b487061eea
2 changed files with 31 additions and 2 deletions
|
@ -71,6 +71,8 @@
|
||||||
(defvar mu4e-alert-mode-line)
|
(defvar mu4e-alert-mode-line)
|
||||||
(defvar mu4e-alert-modeline-formatter)
|
(defvar mu4e-alert-modeline-formatter)
|
||||||
(defvar nyan-minimum-window-width)
|
(defvar nyan-minimum-window-width)
|
||||||
|
(defvar objed--object)
|
||||||
|
(defvar objed--obj-state)
|
||||||
(defvar persp-nil-name)
|
(defvar persp-nil-name)
|
||||||
(defvar symbol-overlay-keywords-alist)
|
(defvar symbol-overlay-keywords-alist)
|
||||||
(defvar symbol-overlay-temp-symbol)
|
(defvar symbol-overlay-temp-symbol)
|
||||||
|
@ -1448,6 +1450,33 @@ mouse-1: Display Line and Column Mode Menu"
|
||||||
(doom-modeline--ryo)
|
(doom-modeline--ryo)
|
||||||
(doom-modeline--xah-fly-keys)))
|
(doom-modeline--xah-fly-keys)))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; objed-state
|
||||||
|
;;
|
||||||
|
|
||||||
|
(defvar doom-modeline--objed-active nil)
|
||||||
|
|
||||||
|
(defun doom-modeline-update-objed (_ &optional reset)
|
||||||
|
"Update `objed' status, inactive when RESET is true."
|
||||||
|
(setq doom-modeline--objed-active (not reset)))
|
||||||
|
|
||||||
|
(setq objed-modeline-setup-func #'doom-modeline-update-objed)
|
||||||
|
|
||||||
|
(doom-modeline-def-segment objed-state ()
|
||||||
|
"The current objed state."
|
||||||
|
(when (and doom-modeline--objed-active
|
||||||
|
(doom-modeline--active))
|
||||||
|
(propertize
|
||||||
|
(format " %s(%s) "
|
||||||
|
(symbol-name objed--object)
|
||||||
|
(char-to-string (aref (symbol-name objed--obj-state) 0)))
|
||||||
|
'face 'doom-modeline-evil-emacs-state
|
||||||
|
'help-echo (format "Objed object: %s (%s)"
|
||||||
|
(symbol-name objed--object)
|
||||||
|
(symbol-name objed--obj-state)))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; input method
|
;; input method
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
(doom-modeline-def-modeline 'main
|
(doom-modeline-def-modeline 'main
|
||||||
'(bar workspace-name window-number modals matches buffer-info remote-host buffer-position parrot selection-info)
|
'(bar workspace-name window-number modals matches buffer-info remote-host buffer-position parrot selection-info)
|
||||||
'(misc-info persp-name lsp irc mu4e github debug fancy-battery minor-modes input-method buffer-encoding major-mode process vcs checker))
|
'(objed-state misc-info persp-name lsp irc mu4e github debug fancy-battery minor-modes input-method buffer-encoding major-mode process vcs checker))
|
||||||
|
|
||||||
(doom-modeline-def-modeline 'minimal
|
(doom-modeline-def-modeline 'minimal
|
||||||
'(bar matches " " buffer-info)
|
'(bar matches " " buffer-info)
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
|
|
||||||
(doom-modeline-def-modeline 'special
|
(doom-modeline-def-modeline 'special
|
||||||
'(bar window-number modals matches buffer-info-simple buffer-position parrot selection-info)
|
'(bar window-number modals matches buffer-info-simple buffer-position parrot selection-info)
|
||||||
'(misc-info lsp irc-buffers debug fancy-battery minor-modes input-method buffer-encoding major-mode process checker))
|
'(objed-state misc-info lsp irc-buffers debug fancy-battery minor-modes input-method buffer-encoding major-mode process checker))
|
||||||
|
|
||||||
(doom-modeline-def-modeline 'project
|
(doom-modeline-def-modeline 'project
|
||||||
'(bar window-number " " buffer-default-directory)
|
'(bar window-number " " buffer-default-directory)
|
||||||
|
|
Loading…
Reference in a new issue