diff options
author | Jake Mannens <jakem_5@hotmail.com> | 2020-12-20 01:48:07 +1100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-12-23 18:30:26 +0100 |
commit | f1463fdd6429c670c61c0f790e9545d822a3c1ce (patch) | |
tree | 208f0f833f23d1dc87635c75c61d89ec5d433439 /Action.c | |
parent | 3edb6e1ea3fc7434585528d21da1f2f86bb34d1b (diff) |
Added keybind 'N' for sorting by PID
Diffstat (limited to 'Action.c')
-rw-r--r-- | Action.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -195,6 +195,10 @@ static Htop_Reaction actionResize(State* st) { return HTOP_REDRAW_BAR; } +static Htop_Reaction actionSortByPID(State* st) { + return Action_setSortKey(st->settings, PID); +} + static Htop_Reaction actionSortByMemory(State* st) { return Action_setSortKey(st->settings, PERCENT_MEM); } @@ -452,7 +456,7 @@ static const struct { { .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 = "N P M T: ", .info = "sort by PID, CPU%, MEM% or TIME" }, { .key = " I: ", .info = "invert sort order" }, { .key = " F6 > .: ", .info = "select sort column" }, { .key = NULL, .info = NULL } @@ -645,6 +649,7 @@ void Action_setBindings(Htop_Action* keys) { keys['I'] = actionInvertSortOrder; keys['K'] = actionToggleKernelThreads; keys['M'] = actionSortByMemory; + keys['N'] = actionSortByPID; keys['P'] = actionSortByCPU; keys['S'] = actionSetup; keys['T'] = actionSortByTime; |