summaryrefslogtreecommitdiffstats
path: root/Action.c
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-07-29 21:32:36 +0200
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-08-07 14:20:14 +0200
commitfc0e44662c0644fdca75260335734b8cd1090986 (patch)
tree601a90a0e582507c7a6e235709054ed5862603ed /Action.c
parent293eec4265e1a2555bffe351c5a85d6f55f1a52b (diff)
Add shortcut key 'p' to toggle full program paths.
Diffstat (limited to 'Action.c')
-rw-r--r--Action.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Action.c b/Action.c
index af6f2be9..19cc7e35 100644
--- a/Action.c
+++ b/Action.c
@@ -211,6 +211,11 @@ static Htop_Reaction actionToggleUserlandThreads(State* st) {
return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS;
}
+static Htop_Reaction actionToggleProgramPath(State* st) {
+ st->settings->showProgramPath = !st->settings->showProgramPath;
+ return HTOP_REFRESH | HTOP_SAVE_SETTINGS;
+}
+
static Htop_Reaction actionToggleTreeView(State* st) {
st->settings->treeView = !st->settings->treeView;
if (st->settings->treeView) st->settings->direction = 1;
@@ -501,6 +506,7 @@ void Action_setBindings(Htop_Action* keys) {
keys['P'] = actionSortByCPU;
keys['H'] = actionToggleUserlandThreads;
keys['K'] = actionToggleKernelThreads;
+ keys['p'] = actionToggleProgramPath;
keys['t'] = actionToggleTreeView;
keys[KEY_F(5)] = actionToggleTreeView;
keys[KEY_F(4)] = actionIncFilter;

© 2014-2024 Faster IT GmbH | imprint | privacy policy