nordtheme / tmux

An arctic, north-bluish clean and elegant tmux color theme.
https://www.nordtheme.com/ports/tmux
MIT License
1.06k stars 141 forks source link

status-right includes full hostname instead of short hostname #44

Open bwoodruff opened 4 years ago

bwoodruff commented 4 years ago

This theme currently shows the full hostname including any domain information: #H, e.g. node.site.domain.tld This can be quite long and if so may get cut off (see #26) I would request that instead only the "short" hostname, without domain information be shown: #h

I thought this would be a simple fix but I tried replacing #H with #h in nord-status-content.conf and nord-status-content-no-patched-font.conf in ~/.tmux/plugins/nord-tmux/src/ and relaunched tmux... that didn't seem to do it, unfortunately. I'm not sure what more needs to be done.

kierun commented 4 years ago

Did you tmux kill-server?

arcticicestudio commented 4 years ago

Hi @bwoodruff :wave:, thanks for your contribution :+1: This sounds like a good solution, but this might also break the expectations of other users who'd like to see the full name e.g. when working in SSH sessions. There are more reported issues in this repository regarding the content and I guess there's no way around a refactoring of the theme to be more flexible and allow dynamic customization of the content. The proposed solution in #27 would fix the problems described in #26 and #25, but this also means there's less space for actual tabs in the middle bar. Finding a good balance between these elements isn't that easy, but using the short hostname might be a better default.

bwoodruff commented 4 years ago

Did you tmux kill-server?

Ah, my bad. This worked. :)

Thank you for your comments and consideration @arcticicestudio. I think #h may be the more sensible default in the balance of giving valuable information and preserving screen real estate. But that's just an opinion. :)

kierun commented 3 years ago

Would a clever use of if-shell be useful to check if the current session is a local one (aka not ssh) or to detect if the session is via ssh? I tried messing around with it and did not get far…

This would allow to have a default for either.

bwoodruff commented 3 years ago

Would a clever use of if-shell be useful to check if the current session is a local one (aka not ssh) or to detect if the session is via ssh? I tried messing around with it and did not get far…

This would allow to have a default for either.

That would make infinite sense to me. Would be interested to hear if you get this working.

WendersonBarros commented 1 year ago

Replacing '#H' for '#(cut -d "." -f 1 <<< "#H")' in the 'nord-status-content...' files also works.