Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkirk
Copy link
Contributor

@jkirk jkirk commented Oct 7, 2024

No description provided.

@jkirk jkirk requested review from zeha and mika October 7, 2024 11:31
@jkirk jkirk changed the title tmux: status-right: Show IP addresses (similar to our GNU/screen configuration tmux: status-right: Show IP addresses (similar to our GNU/screen configuration) Oct 7, 2024
#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"
Copy link
Contributor

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

Copy link
Member

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?)

Copy link
Member

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

Copy link
Member

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)

Copy link
Member

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? 😁

Copy link
Member

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

Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants