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

Feature request: option to disable printing the "caption" at the top (Nethogs version x.x.x) #278

Open
aglidden opened this issue Aug 7, 2024 · 2 comments

Comments

@aglidden
Copy link

aglidden commented Aug 7, 2024

Would it be possible to add a flag to disable printing "NetHogs version x.x.x" at the top of the window? I like to run nethogs in an itty-bitty tmux pane and it would be 2 lines more space efficient if we could disable that.

I believe the relevant code is

nethogs/src/cui.cpp

Lines 287 to 288 in 0fe341e

caption = new std::string("NetHogs");
caption->append(getVersion());
and

nethogs/src/cui.cpp

Lines 372 to 376 in 0fe341e

mvprintw(0, 0, "%s", caption->c_str());
attron(A_REVERSE);
mvprintw(2, 0,
" PID USER %-*.*s %-*.*s SENT RECEIVED ",
proglen, proglen, "PROGRAM", devlen, devlen, "DEV");

Thank you for the awesome program, it's great!

@raboof
Copy link
Owner

raboof commented Aug 8, 2024

sounds reasonable to me, would you be up for a PR?

@aglidden
Copy link
Author

aglidden commented Aug 8, 2024

I haven't touched cpp in a couple decades (and then only in school) so it would very much be a monkey/typewriter situation, but I can muddle through it after getting an environment set up. I will take a look into it if no one better equipped has the time to get to it before I do. For the sake of code quality I'll hold off for a bit and give the big guns an opportunity to do it right first though, should they have the time. ;)

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

No branches or pull requests

2 participants