Skip to content

feat: show/hide ip address option#1573

Open
yuheho7749 wants to merge 1 commit intoaristocratos:mainfrom
yuheho7749:hide-ip
Open

feat: show/hide ip address option#1573
yuheho7749 wants to merge 1 commit intoaristocratos:mainfrom
yuheho7749:hide-ip

Conversation

@yuheho7749
Copy link
Copy Markdown

@yuheho7749 yuheho7749 commented Mar 13, 2026

This implements a menu option to show or hide ip addresses. This is useful on systems with public ip addresses.

Closes #1273

Built and tested on Arch Linux 6.19.6

Copy link
Copy Markdown
Collaborator

@deckstose deckstose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should rename this to align with the other net_ options. I also want to flip the option (since it's rather odd or special to hide the IP address). I suggest net_hide_ip or net_hide_ip_addresses and default it to false obviously.

Comment thread src/btop_draw.cpp Outdated
if (force_redraw) redraw = true;
auto net_sync = Config::getB("net_sync");
auto net_auto = Config::getB("net_auto");
auto show_ip = Config::getB("show_ip");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be const.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was following the other Config::getB. I can change this if you want.

Comment thread src/btop_menu.cpp Outdated
{"show_ip",
"IP address visibility.",
"",
"Manually set the IP address visibility.",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant.

Comment thread src/btop_menu.cpp Outdated
"",
"True, False, or Auto",},
{"show_ip",
"IP address visibility.",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be more direct on what happens if this is set to true. The false case is self explanatory.

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.

Hide ip in the "net" box

2 participants