Helm-mini displays a yellow
@ when a file or buffer is remote (in my case accessed via tramp/ssh), which I find quite handy. I'd like to add such a marker to the buffer name part of my modeline, but I'm not sure what's the best way. I'm using
Define a separate face, e.g.,
my-remote-buf, that you use to show remote buffers.
mode-line-buffer-identificationto use that face when the buffer is remote:
(setq mode-line-buffer-identification (list (propertize (car mode-line-buffer-identification) 'face 'my-remote-buf)))
rename-buffer function be what you are looking for? You could use a hook to append @ to a buffer name if you'd like to do it automatically.