Fix #16: [Feature] process segment.

This commit is contained in:
Vincent Zhang 2018-08-13 00:14:32 +08:00
parent 54e921f04f
commit cbddf23923

View file

@ -604,11 +604,9 @@ directory, the file name, and its state (modified, read-only or non-existent)."
;; ;;
(doom-modeline-def-segment major-mode (doom-modeline-def-segment major-mode
"The major mode, including process, environment and text-scale info." "The major mode, including environment and text-scale info."
(propertize (propertize
(concat (format-mode-line mode-name) (concat (format-mode-line mode-name)
(when (stringp mode-line-process)
mode-line-process)
(when doom-modeline-env-version (when doom-modeline-env-version
(concat " " doom-modeline-env-version)) (concat " " doom-modeline-env-version))
(and (featurep 'face-remap) (and (featurep 'face-remap)
@ -621,6 +619,16 @@ directory, the file name, and its state (modified, read-only or non-existent)."
'face (if (doom-modeline--active) 'doom-modeline-buffer-major-mode))) 'face (if (doom-modeline--active) 'doom-modeline-buffer-major-mode)))
;;
;; process
;;
(doom-modeline-def-segment process
"The process info."
(if mode-line-process
mode-line-process
""))
;; ;;
;; vcs ;; vcs
;; ;;
@ -1007,7 +1015,7 @@ See `mode-line-percent-position'.")
(doom-modeline-def-modeline main (doom-modeline-def-modeline main
(workspace-number window-number bar evil-state matches " " buffer-info buffer-position " " selection-info) (workspace-number window-number bar evil-state matches " " buffer-info buffer-position " " selection-info)
(global buffer-encoding major-mode vcs flycheck)) (global buffer-encoding major-mode process vcs flycheck))
(doom-modeline-def-modeline minimal (doom-modeline-def-modeline minimal
(bar matches " " buffer-info) (bar matches " " buffer-info)
@ -1015,7 +1023,7 @@ See `mode-line-percent-position'.")
(doom-modeline-def-modeline special (doom-modeline-def-modeline special
(window-number bar evil-state matches " " buffer-info-simple buffer-position " " selection-info) (window-number bar evil-state matches " " buffer-info-simple buffer-position " " selection-info)
(global buffer-encoding major-mode flycheck)) (global buffer-encoding major-mode process flycheck))
(doom-modeline-def-modeline project (doom-modeline-def-modeline project
(window-number bar buffer-default-directory) (window-number bar buffer-default-directory)