summaryrefslogtreecommitdiffstats
path: root/Settings.h
diff options
context:
space:
mode:
authorDaniel Flanagan <daniel@lytedev.io>2019-10-31 11:20:55 -0500
committerDaniel Flanagan <daniel@lytedev.io>2019-10-31 11:20:55 -0500
commit12805f61d89f2869352ed83b98986cab730bd6fb (patch)
treee9921be21cc6b1c3a1aa9f689c847048244fe727 /Settings.h
parent28840683cfc5d48307b9b0f382f55f8c84d6a0c4 (diff)
Add simple vim mode
This commit adds a "vim_mode" setting (false/`0` by default) that causes keys to be remapped in the following way by the `ScreenManager`: + h -> LEFT + j -> DOWN + k -> UP + l -> RIGHT + LEFT -> h (toggle help) + DOWN -> j (noop) + UP -> k (open kill menu) + RIGHT -> l (lsof current process) + K (Shift+K) -> k (open kill menu) + J (Shift+J) -> K (toggle show/hide kernel threads) + L (Shift+L) -> l (lsof current process) I couldn't figure out where the manpage documentation is in the repo, though I admittedly did not look particularly hard. I believe this change would be a welcome option for heavy vim users like myself who would like a familiar way to get around in htop.
Diffstat (limited to 'Settings.h')
-rw-r--r--Settings.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Settings.h b/Settings.h
index d9dc0683..6e3fb512 100644
--- a/Settings.h
+++ b/Settings.h
@@ -22,7 +22,7 @@ typedef struct {
typedef struct Settings_ {
char* filename;
-
+
MeterColumnSettings columns[2];
ProcessField* fields;
@@ -49,6 +49,7 @@ typedef struct Settings_ {
bool updateProcessNames;
bool accountGuestInCPUMeter;
bool headerMargin;
+ bool vimMode;
bool changed;
} Settings;

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