-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
Added keybind 'N' for sorting by PID #413
Conversation
Action.c
Outdated
{ .key = " Arrows: ", .info = "scroll process list" }, | ||
{ .key = " Digits: ", .info = "incremental PID search" }, | ||
{ .key = " F3 /: ", .info = "incremental name search" }, | ||
{ .key = " F4 \\: ",.info = "incremental name filtering" }, | ||
{ .key = " F5 t: ", .info = "tree view" }, | ||
{ .key = " p: ", .info = "toggle program path" }, | ||
{ .key = " m: ", .info = "toggle merged command" }, | ||
{ .key = " Z: ", .info = "pause/resume process updates" }, | ||
{ .key = " u: ", .info = "show processes of a single user" }, | ||
{ .key = " H: ", .info = "hide/show user process threads" }, | ||
{ .key = " K: ", .info = "hide/show kernel threads" }, | ||
{ .key = " F: ", .info = "cursor follows process" }, | ||
{ .key = " + -: ", .info = "expand/collapse tree" }, | ||
{ .key = " P M T: ", .info = "sort by CPU%, MEM% or TIME" }, | ||
{ .key = " I: ", .info = "invert sort order" }, | ||
{ .key = " F6 > .: ", .info = "select sort column" }, | ||
{ .key = " Arrows: ", .info = "scroll process list" }, | ||
{ .key = " Digits: ", .info = "incremental PID search" }, | ||
{ .key = " F3 /: ", .info = "incremental name search" }, | ||
{ .key = " F4 \\: ",.info = "incremental name filtering" }, | ||
{ .key = " F5 t: ", .info = "tree view" }, | ||
{ .key = " p: ", .info = "toggle program path" }, | ||
{ .key = " m: ", .info = "toggle merged command" }, | ||
{ .key = " Z: ", .info = "pause/resume process updates" }, | ||
{ .key = " u: ", .info = "show processes of a single user" }, | ||
{ .key = " H: ", .info = "hide/show user process threads" }, | ||
{ .key = " K: ", .info = "hide/show kernel threads" }, | ||
{ .key = " F: ", .info = "cursor follows process" }, | ||
{ .key = " F6 + -: ", .info = "expand/collapse tree" }, | ||
{ .key = " N P M T: ", .info = "sort by PID, CPU%, MEM% or TIME" }, | ||
{ .key = " I: ", .info = "invert sort order" }, | ||
{ .key = " F6 > .: ", .info = "select sort column" }, |
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.
Resizing the key column causes too much unnecessary noise in the patch.
Action.c
Outdated
mvaddstr(line + item, 9, helpLeft[item].info); | ||
mvaddstr(line + item, 10, helpLeft[item].info); | ||
attrset(CRT_colors[HELP_BOLD]); | ||
mvaddstr(line + item, 0, helpLeft[item].key); | ||
if (String_eq(helpLeft[item].key, " H: ")) { | ||
if (String_eq(helpLeft[item].key, " H: ")) { | ||
attrset(CRT_colors[PROCESS_THREAD]); | ||
mvaddstr(line + item, 32, "threads"); | ||
} else if (String_eq(helpLeft[item].key, " K: ")) { | ||
mvaddstr(line + item, 33, "threads"); | ||
} else if (String_eq(helpLeft[item].key, " K: ")) { | ||
attrset(CRT_colors[PROCESS_THREAD]); | ||
mvaddstr(line + item, 26, "threads"); | ||
mvaddstr(line + item, 27, "threads"); |
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.
Further resize-related noise.
mvaddstr(line + item, 40, helpRight[item].key); | ||
mvaddstr(line + item, 41, helpRight[item].key); | ||
attrset(CRT_colors[DEFAULT_COLOR]); | ||
mvaddstr(line + item, 49, helpRight[item].info); | ||
mvaddstr(line + item, 50, helpRight[item].info); |
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.
dito.
Action.c
Outdated
{ .key = " H: ", .info = "hide/show user process threads" }, | ||
{ .key = " K: ", .info = "hide/show kernel threads" }, | ||
{ .key = " F: ", .info = "cursor follows process" }, | ||
{ .key = " F6 + -: ", .info = "expand/collapse tree" }, |
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.
F6 is no more.
What would your suggestion be? Adding the keybind to I'm happy to change the patch, and am open to suggestions... |
Instead of adding spaces everywhere I think it'd be less noise, if just the horizontal offset of everything was shifted to the right by one. The entry you need to actually update has two spaces at the front, thus you could fit it in there. An alternative was to split the PMT line entirely (One function per line) and shuffle things from the left to the right (or vice versa) and add the N shortcut in a second commit. |
I've updated it with changes only to the hardcoded X positions. I had assumed the leading spaces were desired, as they were present in both arrays. Regarding splitting the sort functions onto multiple lines, I'll leave that decision to you. I think it looks better being one character wider, than a column being three lines longer. But like I said, it's up to you. |
Draw the FunctionBar within Panel_draw instead of manually throughout the code. Add an optional PanelClass function drawFunctionBar, to allow specific panels to override the default FunctionBar_draw call. Rework the code on color change, to really change all colors (selection markers and panel headers). Closes: #402
- drop unused kinfo includes and link argument - detect kvm library necessity at configure step - fix variable typo
- move some functions to file scope - drop unused global variable
see
Either we remove these bindings or we need to find something else to map to PID sorting. |
Avoid accidental duplicate usage.
…into BenBE-harden_makecommandstr
I just noticed that. What do you think is best? If we remove the original bindings, we can preserve some compatibility with |
I think we should remove the old n / N bindings and the stale code they call. |
Created #425 with proposal for code removal |
Merged the patch (fixed back to using the N key) in the series up to f1463fd. Thank you very much! |
N
key was selected, as it seems to be free and is backwards compatible withtop
.