-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tmux: status-right: Show IP addresses (similar to our GNU/screen configuration) #159
base: master
Are you sure you want to change the base?
Conversation
#set -g status-right '#[fg=yellow]%Y-%m-%d %H:%M' | ||
### status-right: IPs and Date and Time | ||
set -g status-right-length 100 | ||
set -g status-right "#[fg=green](net: #(hostname -I | sed -e 's/ [^ ]*:.*$//;s/ / | /g;s/ | $//')) #[fg=yellow]%Y-%m-%d %H:%M" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, hostname -I
is not portable to e.g. OpenBSD: https://man.openbsd.org/hostname.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW,
hostname -I
is not portable to e.g. OpenBSD: https://man.openbsd.org/hostname.1
Excellent point, thanks @moviuro! I think we should go through our wrapper script then, which only runs hostname -I
if that's available? (And possibly fall back to something else otherwise, if at all?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we do wrapper scripts we can stick to the perl variant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(its not like ip-screen worked on openbsd either)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we do wrapper scripts we can stick to the perl variant
wondering whether it would make sense to have ip-screen
inside $PATH which then is simple script to check for hostname -I
support and if not supported falls back to your perl script otherwise? 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(its not like ip-screen worked on openbsd either)
oh, good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's worth having separate config file sets, one to use on the live CD, and one for people pulling the individual files. Not sure how f.e. screenrc worked before for individual-config-file users?
No description provided.