Add an indicator of remote host.

This commit is contained in:
Vincent Zhang 2018-11-22 03:59:39 +08:00
parent d430859bf2
commit a7643cf918

View file

@ -1206,12 +1206,23 @@ See `mode-line-percent-position'.")
" ")))) " "))))
;;
;; remote host
;;
(doom-modeline-def-segment remote-host
"Hostname for remote buffers."
(when default-directory
(when-let ((host (file-remote-p default-directory 'host)))
(concat "@" host))))
;; ;;
;; Mode lines ;; Mode lines
;; ;;
(doom-modeline-def-modeline 'main (doom-modeline-def-modeline 'main
'(bar workspace-number window-number evil-state god-state ryo-modal-state matches " " buffer-info buffer-position " " selection-info) '(bar workspace-number window-number evil-state god-state ryo-modal-state matches " " buffer-info remote-host buffer-position " " selection-info)
'(global input-method buffer-encoding major-mode process vcs flycheck)) '(global input-method buffer-encoding major-mode process vcs flycheck))
(doom-modeline-def-modeline 'minimal (doom-modeline-def-modeline 'minimal