tmux icon indicating copy to clipboard operation
tmux copied to clipboard

Enhancement: show username and hostname

Open wsh3776 opened this issue 5 years ago • 6 comments

Describe the feature you'd like

Is it possible to add a setting that can show the current username and hostname

Describe risks you've considered

I think it wouldn't have much risk.

Describe alternatives you've considered

I can use echo user and hostname to show this, but can I show it in the bottom status bar. I often login the remote machine. So if I can see which host I am current in, it would be nice!

image

I think it can be achieved by edit the script.sh, but I am not sure how to do it.

wsh3776 avatar Oct 25 '20 09:10 wsh3776

Yeah we could do this, but I don't really see how useful it is. You could literally just type whoami and hostname and get those. We need to reduce feature bloat because now this project is becoming quite large and we should focus on the things that are actually needed. Like working with operating systems on than Linux and Mac, better compatibility with other plugins, color theming, etc.

Closing unless I can get a really good reason on why we need these. :)

ethancedwards8 avatar Oct 25 '20 20:10 ethancedwards8

I work on my laptop and a remote machine connect through ssh from my laptop at the same time. Thus I often have multiple tmux session running, some locally and some remotely. Therefore, I hope the status bar could tell me where the session is running, locally or remotely. Although I could have these info in the zsh prompt, the prompt is not always visible, for example in vim.

qifei9 avatar Nov 26 '20 09:11 qifei9

What @qifei9 describes is exactly why i need this feature. Is there a way around to do this?

osbm avatar Jul 03 '24 12:07 osbm

Can we reopen this issue? @ethancedwards8

osbm avatar Jul 03 '24 13:07 osbm

using set -g @dracula-show-left-icon "#H" one can get the host name of the machine where the session runs in the top left. what i find even more useful is set -g @dracula-show-left-icon "#H | #S" which tells me on which machine i am and what the name of the session is, since some of my servers have multiple sessions for different long run projects.

i think that with this in mind, we should be able to close this issue again. mby i should write about this in the docs #278

Theoreticallyhugo avatar Aug 19 '24 19:08 Theoreticallyhugo

@Theoreticallyhugo your answer is very interesting i will try that out.

I should mention, i was able to meet my need with just by doing this:

set -g @dracula-show-left-icon hostname

osbm avatar Aug 19 '24 19:08 osbm