diff options
author | KoffeinFlummi | 2021-03-21 15:06:12 +0100 |
---|---|---|
committer | KoffeinFlummi | 2021-03-21 15:06:12 +0100 |
commit | 8ad7ca8666f85b6c26ab033ab37844b623d61616 (patch) | |
tree | 1079f9744304a81fc519db5da5eaa10087c5d300 | |
parent | 352cc74e630d7abf2f61a4e0eac3c2d1d80b9bbb (diff) | |
download | aur-8ad7ca8666f85b6c26ab033ab37844b623d61616.tar.gz |
Update patch for menus
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | vim-keybindings.patch | 36 |
3 files changed, 39 insertions, 5 deletions
@@ -1,6 +1,6 @@ pkgbase = htop-vim-git pkgdesc = Interactive text-mode process viewer. Patched for vim keybindings - pkgver = 3.0.5.24.g71f51a2 + pkgver = 3.0.5.176.g70fecb4 pkgrel = 1 epoch = 1 url = https://github.com/htop-dev/htop @@ -21,7 +21,7 @@ pkgbase = htop-vim-git source = git+https://github.com/htop-dev/htop.git source = vim-keybindings.patch sha256sums = SKIP - sha256sums = 57f51adeb4313a412b6a3e5a6f69082895df36eb2bbc8e4eaadea40c435479d8 + sha256sums = 6aca35a573a327acfb76d191d9e65d87d14c4ede23dbbe51774b79e424f3f3cb pkgname = htop-vim-git @@ -2,7 +2,7 @@ _pkgname=htop pkgname=${_pkgname}-vim-git -pkgver=3.0.5.24.g71f51a2 +pkgver=3.0.5.176.g70fecb4 pkgrel=1 epoch=1 pkgdesc="Interactive text-mode process viewer. Patched for vim keybindings" @@ -19,7 +19,7 @@ options=('!emptydirs') source=("git+${url}.git" 'vim-keybindings.patch') sha256sums=('SKIP' - '57f51adeb4313a412b6a3e5a6f69082895df36eb2bbc8e4eaadea40c435479d8') + '6aca35a573a327acfb76d191d9e65d87d14c4ede23dbbe51774b79e424f3f3cb') pkgver() { cd "${srcdir}/${_pkgname}" diff --git a/vim-keybindings.patch b/vim-keybindings.patch index 3cb963463a1d..b1ccda5c1c2f 100644 --- a/vim-keybindings.patch +++ b/vim-keybindings.patch @@ -77,6 +77,25 @@ index 0b5c899..c3b7166 100644 + keys['o'] = actionExpandCollapseOrSortColumn; keys[KEY_RECLICK] = actionExpandOrCollapse; } +diff --git a/CategoriesPanel.c b/CategoriesPanel.c +index 4ee1ad4..43930da 100644 +--- a/CategoriesPanel.c ++++ b/CategoriesPanel.c +@@ -67,6 +67,14 @@ static HandlerResult CategoriesPanel_eventHandler(Panel* super, int ch) { + HandlerResult result = IGNORED; + + int selected = Panel_getSelectedIndex(super); ++ ++ switch (ch) { ++ case 'k': ch = KEY_UP; break; ++ case 'j': ch = KEY_DOWN; break; ++ case 'h': ch = KEY_LEFT; break; ++ case 'l': ch = KEY_RIGHT; break; ++ } ++ + switch (ch) { + case EVENT_SET_SELECTED: + result = HANDLED; diff --git a/Panel.c b/Panel.c index 986a989..e7cb440 100644 --- a/Panel.c @@ -202,9 +221,24 @@ index 880597d..0c44936 100644 For more information and details on how to contribute to `htop` visit [htop.dev](https://htop.dev). diff --git a/ScreenManager.c b/ScreenManager.c -index 64af535..6c947a8 100644 +index 64af535..5d7432d 100644 --- a/ScreenManager.c +++ b/ScreenManager.c +@@ -215,10 +215,10 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { + continue; + } + switch (ch) { +- case KEY_ALT('H'): ch = KEY_LEFT; break; +- case KEY_ALT('J'): ch = KEY_DOWN; break; +- case KEY_ALT('K'): ch = KEY_UP; break; +- case KEY_ALT('L'): ch = KEY_RIGHT; break; ++ case 'h': case KEY_ALT('H'): ch = KEY_LEFT; break; ++ case 'j': case KEY_ALT('J'): ch = KEY_DOWN; break; ++ case 'k': case KEY_ALT('K'): ch = KEY_UP; break; ++ case 'l': case KEY_ALT('L'): ch = KEY_RIGHT; break; + } + redraw = true; + if (Panel_eventHandlerFn(panelFocus)) { @@ -251,7 +251,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { continue; } |