Package Details: htop-vim-git 1:3.3.0.20.g32cb3027-1

Git Clone URL: https://aur.archlinux.org/htop-vim-git.git (read-only, click to copy)
Package Base: htop-vim-git
Description: Interactive text-mode process viewer. Patched for vim keybindings
Upstream URL: https://github.com/htop-dev/htop
Licenses: GPL
Conflicts: htop, htop-git
Provides: htop
Submitter: KoffeinFlummi
Maintainer: KoffeinFlummi
Last Packager: KoffeinFlummi
Votes: 24
Popularity: 0.150949
First Submitted: 2015-08-06 05:38 (UTC)
Last Updated: 2024-01-29 09:26 (UTC)

Dependencies (6)

Required by (4)

Sources (2)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

jemadux commented on 2021-04-25 14:12 (UTC)

problem in prepare()

KoffeinFlummi commented on 2021-01-16 12:27 (UTC)

Patch should be fixed again.

cipher699 commented on 2021-01-09 08:10 (UTC) (edited on 2021-01-09 08:11 (UTC) by cipher699)

vim-keybindings.patch

diff --git a/Action.c b/Action.c
index 88ccf6d..e1e21f1 100644
--- a/Action.c
+++ b/Action.c
@@ -433,7 +433,7 @@ static const struct {
    const char* key;
    const char* info;
 } helpLeft[] = {
-   { .key = " Arrows: ", .info = "scroll process list" },
+   { .key = "   hjkl: ", .info = "scroll process list" },
    { .key = " Digits: ", .info = "incremental PID search" },
    { .key = "   F3 /: ", .info = "incremental name search" },
    { .key = "   F4 \\: ",.info = "incremental name filtering" },
@@ -459,7 +459,7 @@ static const struct {
    { .key = "  Space: ", .info = "tag process" },
    { .key = "      c: ", .info = "tag process and its children" },
    { .key = "      U: ", .info = "untag all processes" },
-   { .key = "   F9 k: ", .info = "kill process/tagged processes" },
+   { .key = "   F9 x: ", .info = "kill process/tagged processes" },
    { .key = "   F7 ]: ", .info = "higher priority (root only)" },
    { .key = "   F8 [: ", .info = "lower priority (+ nice)" },
 #if (defined(HAVE_LIBHWLOC) || defined(HAVE_LINUX_AFFINITY))
@@ -467,12 +467,12 @@ static const struct {
 #endif
    { .key = "      e: ", .info = "show process environment" },
    { .key = "      i: ", .info = "set IO priority" },
-   { .key = "      l: ", .info = "list open files with lsof" },
-   { .key = "      x: ", .info = "list file locks of process" },
+   { .key = "      L: ", .info = "list open files with lsof" },
+   { .key = "      X: ", .info = "list file locks of process" },
    { .key = "      s: ", .info = "trace syscalls with strace" },
    { .key = "      w: ", .info = "wrap process command in multiple lines" },
    { .key = " F2 C S: ", .info = "setup" },
-   { .key = "   F1 h: ", .info = "show this help screen" },
+   { .key = "   F1 ?: ", .info = "show this help screen" },
    { .key = "  F10 q: ", .info = "quit" },
    { .key = NULL, .info = NULL }
 };
@@ -638,12 +638,14 @@ void Action_setBindings(Htop_Action* keys) {
    keys['H'] = actionToggleUserlandThreads;
    keys['I'] = actionInvertSortOrder;
    keys['K'] = actionToggleKernelThreads;
+   keys['L'] = actionLsof;
    keys['M'] = actionSortByMemory;
    keys['N'] = actionSortByPID;
    keys['P'] = actionSortByCPU;
    keys['S'] = actionSetup;
    keys['T'] = actionSortByTime;
    keys['U'] = actionUntagAll;
+   keys['X'] = actionShowLocks;
    keys['Z'] = actionTogglePauseProcessUpdate;
    keys['['] = actionLowerPriority;
    keys['\014'] = actionRedraw; // Ctrl+L
@@ -653,9 +655,6 @@ void Action_setBindings(Htop_Action* keys) {
    keys['a'] = actionSetAffinity;
    keys['c'] = actionTagAllChildren;
    keys['e'] = actionShowEnvScreen;
-   keys['h'] = actionHelp;
-   keys['k'] = actionKill;
-   keys['l'] = actionLsof;
    keys['m'] = actionToggleMergedCommand;
    keys['p'] = actionToggleProgramPath;
    keys['q'] = actionQuit;
@@ -663,7 +662,7 @@ void Action_setBindings(Htop_Action* keys) {
    keys['t'] = actionToggleTreeView;
    keys['u'] = actionFilterByUser;
    keys['w'] = actionShowCommandScreen;
-   keys['x'] = actionShowLocks;
+   keys['x'] = actionKill;
    keys[KEY_F(1)] = actionHelp;
    keys[KEY_F(2)] = actionSetup;
    keys[KEY_F(3)] = actionIncSearch;
@@ -675,5 +674,6 @@ void Action_setBindings(Htop_Action* keys) {
    keys[KEY_F(9)] = actionKill;
    keys[KEY_F(10)] = actionQuit;
    keys[KEY_F(18)] = actionExpandCollapseOrSortColumn;
+   keys['o'] = actionExpandCollapseOrSortColumn;
    keys[KEY_RECLICK] = actionExpandOrCollapse;
 }
diff --git a/Panel.c b/Panel.c
index 5d10375..76242b3 100644
--- a/Panel.c
+++ b/Panel.c
@@ -351,6 +351,7 @@ bool Panel_onKey(Panel* this, int key) {

    switch (key) {
    case KEY_DOWN:
+   case 'j':
    case KEY_CTRL('N'):
    #ifdef KEY_C_DOWN
    case KEY_C_DOWN:
@@ -359,6 +360,7 @@ bool Panel_onKey(Panel* this, int key) {
       break;

    case KEY_UP:
+   case 'k':
    case KEY_CTRL('P'):
    #ifdef KEY_C_UP
    case KEY_C_UP:
@@ -367,7 +369,7 @@ bool Panel_onKey(Panel* this, int key) {
       break;

    case KEY_LEFT:
-   case KEY_CTRL('B'):
+   case 'h':
       if (this->scrollH > 0) {
          this->scrollH -= MAXIMUM(CRT_scrollHAmount, 0);
          this->needsRedraw = true;
@@ -375,16 +377,27 @@ bool Panel_onKey(Panel* this, int key) {
       break;

    case KEY_RIGHT:
-   case KEY_CTRL('F'):
+   case 'l':
       this->scrollH += CRT_scrollHAmount;
       this->needsRedraw = true;
       break;

+   case KEY_CTRL('U'):
+      this->selected -= (this->h - 1) / 2;
+      this->needsRedraw = true;
+      break;
+   case KEY_CTRL('D'):
+      this->selected += (this->h - 1) / 2;
+      this->needsRedraw = true;
+      break;
+
    case KEY_PPAGE:
+   case KEY_CTRL('B'):
       PANEL_SCROLL(-(this->h - Panel_headerHeight(this)));
       break;

    case KEY_NPAGE:
+   case KEY_CTRL('F'):
       PANEL_SCROLL(+(this->h - Panel_headerHeight(this)));
       break;

@@ -397,10 +410,12 @@ bool Panel_onKey(Panel* this, int key) {
       break;

    case KEY_HOME:
+   case 'g':
       this->selected = 0;
       break;

    case KEY_END:
+   case 'G':
       this->selected = size - 1;
       break;

diff --git a/README b/README
index 880597d..0c44936 100644
--- a/README
+++ b/README
@@ -19,6 +19,48 @@ The information displayed is configurable through a graphical setup and can be s

 Tasks related to processes (e.g. killing and renicing) can be done without entering their PIDs.

+Vim keybindings
+----------------
+
+These are the keybindings added in this fork of htop:
+
+```
+    g        to the top (gg in vim)
+
+  <C-b>      up 1 page
+
+  <C-u>      up 1/2 page
+
+    k
+
+h       l    one character
+
+    j
+
+  <C-d>      down 1/2 page
+
+  <C-f>      down 1 page
+
+    G        to the end
+
+--------------------------------------------------
+
+    o        Expand/collapse (like in NERDTree)
+```
+
+In order to accomodate these keybindings, the following changes
+were made to the original keybindings:
+
+* Ctrl+F and Ctrt+B can no longer be used to navigate horizontally
+* 'h' can no longer be used to access the help, leaving Ctrl+F1 & '?'
+* 'k' can no longer be used to kill processes, being replaced with 'x'
+* 'l' can no longer be used to list open files, being replaced with 'L'
+* 'x' can no longer be used to list file locks, being replaced with 'X'
+
+
+Comparison between `htop` and classic `top`
+-------------------------------------------
+
 Running `htop` requires `ncurses` libraries (typically named libncursesw*).

 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 51951a8..8e02dc8 100644
--- a/ScreenManager.c
+++ b/ScreenManager.c
@@ -251,7 +251,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
          continue;
       }
       case KEY_LEFT:
-      case KEY_CTRL('B'):
+      case 'h':
          if (this->panelCount < 2) {
             goto defaultHandler;
          }
@@ -272,7 +272,7 @@ tryLeft:

          break;
       case KEY_RIGHT:
-      case KEY_CTRL('F'):
+      case 'l':
       case 9:
          if (this->panelCount < 2) {
             goto defaultHandler;

KoffeinFlummi commented on 2020-12-31 01:22 (UTC)

Should be fixed.

Hekuran commented on 2020-12-25 09:45 (UTC) (edited on 2020-12-25 09:47 (UTC) by Hekuran)

Here is the update: https://pastebin.tech/raw/401/vim%20htop%20git%20PATCH . They sorted some stuff, thats why i didnt work. (that may actually make it not 'not patch' in the future.)

(use `patch -l' to avoid white space diff)

diff --git a/PKGBUILD b/PKGBUILD
index b5537ef..5079dae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,7 +19,7 @@ options=('!emptydirs')
 source=("git+${url}.git"
         'vim-keybindings.patch')
 sha256sums=('SKIP'
-            'c9e6155d1191448858cf863b628827b21f7ce58b2f3ce62e58fa31de82c63afe')
+            '87d29651a7f92ce78a8c099925fa20ab7df890702d209f50d5a4d9b24342b837')

 pkgver() {
     cd "${srcdir}/${_pkgname}"
diff --git a/vim-keybindings.patch b/vim-keybindings.patch
index e55c2b9..3f8551f 100644
--- a/vim-keybindings.patch
+++ b/vim-keybindings.patch
@@ -1,8 +1,8 @@
 diff --git a/Action.c b/Action.c
-index 66934be..c229584 100644
+index 206eb67..6ef5919 100644
 --- a/Action.c
 +++ b/Action.c
-@@ -448,7 +448,7 @@ static const struct {
+@@ -443,7 +443,7 @@ static const struct {
     const char* key;
     const char* info;
  } helpLeft[] = {
@@ -11,7 +11,7 @@ index 66934be..c229584 100644
     { .key = " Digits: ", .info = "incremental PID search" },
     { .key = "   F3 /: ", .info = "incremental name search" },
     { .key = "   F4 \\: ",.info = "incremental name filtering" },
-@@ -474,7 +474,7 @@ static const struct {
+@@ -469,7 +469,7 @@ static const struct {
     { .key = "  Space: ", .info = "tag process" },
     { .key = "      c: ", .info = "tag process and its children" },
     { .key = "      U: ", .info = "untag all processes" },
@@ -20,7 +20,7 @@ index 66934be..c229584 100644
     { .key = "   F7 ]: ", .info = "higher priority (root only)" },
     { .key = "   F8 [: ", .info = "lower priority (+ nice)" },
  #if (defined(HAVE_LIBHWLOC) || defined(HAVE_LINUX_AFFINITY))
-@@ -482,12 +482,12 @@ static const struct {
+@@ -477,12 +477,12 @@ static const struct {
  #endif
     { .key = "      e: ", .info = "show process environment" },
     { .key = "      i: ", .info = "set IO priority" },
@@ -36,44 +36,41 @@ index 66934be..c229584 100644
     { .key = "  F10 q: ", .info = "quit" },
     { .key = NULL, .info = NULL }
  };
-@@ -662,6 +662,7 @@ void Action_setBindings(Htop_Action* keys) {
-    keys['I'] = actionInvertSortOrder;
-    keys[KEY_F(6)] = actionSetSortColumn;
-    keys[KEY_F(18)] = actionExpandCollapseOrSortColumn;
-+   keys['o'] = actionExpandCollapseOrSortColumn;
-    keys['<'] = actionSetSortColumn;
-    keys[','] = actionSetSortColumn;
-    keys['>'] = actionSetSortColumn;
-@@ -670,7 +671,7 @@ void Action_setBindings(Htop_Action* keys) {
-    keys['q'] = actionQuit;
+@@ -663,9 +663,9 @@ void Action_setBindings(Htop_Action* keys) {
     keys['a'] = actionSetAffinity;
-    keys[KEY_F(9)] = actionKill;
+    keys['c'] = actionTagAllChildren;
+    keys['e'] = actionShowEnvScreen;
+-   keys['h'] = actionHelp;
 -   keys['k'] = actionKill;
+-   keys['l'] = actionLsof;
 +   keys['x'] = actionKill;
-    keys[KEY_RECLICK] = actionExpandOrCollapse;
-    keys['+'] = actionExpandOrCollapse;
-    keys['='] = actionExpandOrCollapse;
-@@ -681,13 +682,12 @@ void Action_setBindings(Htop_Action* keys) {
-    keys['S'] = actionSetup;
-    keys['C'] = actionSetup;
-    keys[KEY_F(2)] = actionSetup;
++   keys['d'] = actionKill;
++   keys['L'] = actionLsof;
+    keys['m'] = actionToggleMergedCommand;
+    keys['p'] = actionToggleProgramPath;
+    keys['q'] = actionQuit;
+@@ -673,7 +673,7 @@ void Action_setBindings(Htop_Action* keys) {
+    keys['t'] = actionToggleTreeView;
+    keys['u'] = actionFilterByUser;
+    keys['w'] = actionShowCommandScreen;
 -   keys['x'] = actionShowLocks;
--   keys['l'] = actionLsof;
 +   keys['X'] = actionShowLocks;
-+   keys['L'] = actionLsof;
-    keys['s'] = actionStrace;
-    keys[' '] = actionTag;
-    keys['\014'] = actionRedraw; // Ctrl+L
     keys[KEY_F(1)] = actionHelp;
--   keys['h'] = actionHelp;
-    keys['?'] = actionHelp;
-    keys['U'] = actionUntagAll;
-    keys['c'] = actionTagAllChildren;
+    keys[KEY_F(2)] = actionSetup;
+    keys[KEY_F(3)] = actionIncSearch;
+@@ -685,6 +685,7 @@ void Action_setBindings(Htop_Action* keys) {
+    keys[KEY_F(9)] = actionKill;
+    keys[KEY_F(10)] = actionQuit;
+    keys[KEY_F(18)] = actionExpandCollapseOrSortColumn;
++   keys['o'] = actionExpandCollapseOrSortColumn;
+    keys[KEY_RECLICK] = actionExpandOrCollapse;
+    keys[KEY_RESIZE] = actionResize;
+ }
 diff --git a/Panel.c b/Panel.c
-index 21dfbe2..e8ba9f9 100644
+index 26a0c0e..2ace36a 100644
 --- a/Panel.c
 +++ b/Panel.c
-@@ -333,6 +333,7 @@ bool Panel_onKey(Panel* this, int key) {
+@@ -343,6 +343,7 @@ bool Panel_onKey(Panel* this, int key) {

     switch (key) {
     case KEY_DOWN:
@@ -81,7 +78,7 @@ index 21dfbe2..e8ba9f9 100644
     case KEY_CTRL('N'):
     #ifdef KEY_C_DOWN
     case KEY_C_DOWN:
-@@ -341,6 +342,7 @@ bool Panel_onKey(Panel* this, int key) {
+@@ -351,6 +352,7 @@ bool Panel_onKey(Panel* this, int key) {
        break;

     case KEY_UP:
@@ -89,7 +86,7 @@ index 21dfbe2..e8ba9f9 100644
     case KEY_CTRL('P'):
     #ifdef KEY_C_UP
     case KEY_C_UP:
-@@ -349,7 +351,7 @@ bool Panel_onKey(Panel* this, int key) {
+@@ -359,7 +361,7 @@ bool Panel_onKey(Panel* this, int key) {
        break;

     case KEY_LEFT:
@@ -98,7 +95,7 @@ index 21dfbe2..e8ba9f9 100644
        if (this->scrollH > 0) {
           this->scrollH -= MAXIMUM(CRT_scrollHAmount, 0);
           this->needsRedraw = true;
-@@ -357,18 +359,29 @@ bool Panel_onKey(Panel* this, int key) {
+@@ -367,18 +369,29 @@ bool Panel_onKey(Panel* this, int key) {
        break;

     case KEY_RIGHT:
@@ -129,7 +126,7 @@ index 21dfbe2..e8ba9f9 100644
        this->selected += (this->h - 1);
        this->scrollV = CLAMP_INDEX(this->scrollV, +(this->h - 1), 0, size - this->h);
        this->needsRedraw = true;
-@@ -387,10 +400,12 @@ bool Panel_onKey(Panel* this, int key) {
+@@ -397,10 +410,12 @@ bool Panel_onKey(Panel* this, int key) {
        break;

     case KEY_HOME:
@@ -196,10 +193,10 @@ 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 ac93721..6413bd7 100644
+index 4c74e47..6fce01f 100644
 --- a/ScreenManager.c
 +++ b/ScreenManager.c
-@@ -255,7 +255,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
+@@ -251,7 +251,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
           continue;
        }
        case KEY_LEFT:
@@ -208,7 +205,7 @@ index ac93721..6413bd7 100644
           if (this->panelCount < 2) {
              goto defaultHandler;
           }
-@@ -276,7 +276,7 @@ tryLeft:
+@@ -272,7 +272,7 @@ tryLeft:

           break;
        case KEY_RIGHT:

ashleyr commented on 2020-12-06 01:12 (UTC)

Ah. thanks for clearing that up @Hekuran, sorry for the confusion.

KoffeinFlummi commented on 2020-12-06 01:09 (UTC)

I have updated the patch again, it looks like upstream managed to break the patch again within hours of me fixing it. :>

I also finally changed to the new semantic versioning format.

Hekuran commented on 2020-12-05 17:22 (UTC)

@ashleyr that defeats the whole purpose of -git. You might want to consider making htop-vim release package.

@KoffeinFlummi here is the patch https://pastebin.com/raw/9a8zAHXT . i resolved Panel.c.rej so it builds, though i did not test if the fixing works.

diff --git a/PKGBUILD b/PKGBUILD
index 54a3b1a..bc51bd9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ options=('!emptydirs')
 source=("git+${url}.git"
         'vim-keybindings.patch')
 sha256sums=('SKIP'
-            '96ded8187bbd8a6b25ab98facfcaf0ac4eb889112c4a94b27cd5455eb5f4c4f8')
+            'bf3f1c0aadd68ad44c0cf04a18dab9e6f5bb36c998ea046aed253aa450987d0c')

 pkgver() {
     cd "${srcdir}/${_pkgname}"
diff --git a/vim-keybindings.patch b/vim-keybindings.patch
index ac3981f..54530cb 100644
--- a/vim-keybindings.patch
+++ b/vim-keybindings.patch
@@ -70,70 +70,79 @@ index 66934be..c229584 100644
     keys['U'] = actionUntagAll;
     keys['c'] = actionTagAllChildren;
 diff --git a/Panel.c b/Panel.c
-index 68a245e..f722d7b 100644
+index 21dfbe2..7ed9c10 100644
 --- a/Panel.c
 +++ b/Panel.c
-@@ -329,10 +329,12 @@ bool Panel_onKey(Panel* this, int key) {
-    int size = Vector_size(this->items);
+@@ -333,6 +333,7 @@ bool Panel_onKey(Panel* this, int key) {
+ 
     switch (key) {
     case KEY_DOWN:
 +   case 'j':
     case KEY_CTRL('N'):
-       this->selected++;
+    #ifdef KEY_C_DOWN
+    case KEY_C_DOWN:
+@@ -341,6 +342,7 @@ bool Panel_onKey(Panel* this, int key) {
        break;
+ 
     case KEY_UP:
 +   case 'k':
     case KEY_CTRL('P'):
-       this->selected--;
+    #ifdef KEY_C_UP
+    case KEY_C_UP:
+@@ -349,7 +351,7 @@ bool Panel_onKey(Panel* this, int key) {
        break;
-@@ -347,23 +349,33 @@ bool Panel_onKey(Panel* this, int key) {
-       break;
-    #endif
+ 
     case KEY_LEFT:
 -   case KEY_CTRL('B'):
 +   case 'h':
        if (this->scrollH > 0) {
           this->scrollH -= MAXIMUM(CRT_scrollHAmount, 0);
           this->needsRedraw = true;
-       }
+@@ -357,18 +359,30 @@ bool Panel_onKey(Panel* this, int key) {
        break;
+ 
     case KEY_RIGHT:
 -   case KEY_CTRL('F'):
 +   case 'l':
        this->scrollH += CRT_scrollHAmount;
        this->needsRedraw = true;
        break;
+ 
 +   case KEY_CTRL('U'):
 +      this->selected -= (this->h - 1) / 2;
 +      this->needsRedraw = true;
 +      break;
++
 +   case KEY_CTRL('D'):
 +      this->selected += (this->h - 1) / 2;
 +      this->needsRedraw = true;
 +      break;
++
     case KEY_PPAGE:
 +   case KEY_CTRL('B'):
        this->selected -= (this->h - 1);
-       this->scrollV = MAXIMUM(0, this->scrollV - this->h + 1);
+       this->scrollV = CLAMP_INDEX(this->scrollV, -(this->h - 1), 0, size - this->h);
        this->needsRedraw = true;
        break;
+ 
     case KEY_NPAGE:
 +   case KEY_CTRL('F'):
        this->selected += (this->h - 1);
-       this->scrollV = MAXIMUM(0, MINIMUM(Vector_size(this->items) - this->h,
-                                  this->scrollV + this->h - 1));
-@@ -385,9 +397,11 @@ bool Panel_onKey(Panel* this, int key) {
+       this->scrollV = CLAMP_INDEX(this->scrollV, +(this->h - 1), 0, size - this->h);
+       this->needsRedraw = true;
+@@ -387,10 +401,12 @@ bool Panel_onKey(Panel* this, int key) {
        break;
-    }
+ 
     case KEY_HOME:
 +   case 'g':
        this->selected = 0;
        break;
+ 
     case KEY_END:
 +   case 'G':
        this->selected = size - 1;
        break;
-    case KEY_CTRL('A'):
+ 
 diff --git a/README b/README
 index 880597d..0c44936 100644
 --- a/README
@@ -188,7 +197,7 @@ 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 87746c7..bbfa1a3 100644
+index ac93721..6413bd7 100644
 --- a/ScreenManager.c
 +++ b/ScreenManager.c
 @@ -255,7 +255,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {

ashleyr commented on 2020-12-03 22:47 (UTC) (edited on 2020-12-03 23:00 (UTC) by ashleyr)

The package failed to build (patch errors) for me. It seems that the git repository has moved on since the package was updated. Probably need to specify the commit into package so that it pulls the right code.

If you want to reference tags (releases) rather than commits, I think you can do tag=<name> which may be better if you want to track only releases.

I modified the PKGBUILD to make it work by specifying the commit on the git source:

# Maintainer: Felix Wiegand <koffeinflummi@gmail.com>

_pkgname=htop

_git_rel=1697
_git_sha=d1db9da

pkgname=${_pkgname}-vim-git
pkgver=${_git_rel}.${_git_sha}
pkgrel=1
pkgdesc="Interactive text-mode process viewer. Patched for vim keybindings"
url="https://github.com/htop-dev/${_pkgname}"
license=('GPL')
arch=('i686' 'x86_64' 'armv7h')
depends=('ncurses' 'libncursesw.so' 'libnl')
makedepends=('git')
optdepends=('lsof: show files opened by a process'
            'strace: attach to a running process')
provides=('htop')
conflicts=('htop' 'htop-git')
options=('!emptydirs')
source=("git+${url}.git#commit=${_git_sha}"
        'vim-keybindings.patch')
sha256sums=('SKIP'
            '96ded8187bbd8a6b25ab98facfcaf0ac4eb889112c4a94b27cd5455eb5f4c4f8')

pkgver() {
    cd "${srcdir}/${_pkgname}"
    local ver="$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
    printf "%s" "${ver//-/.}"
}

prepare() {
    cd "${srcdir}/${_pkgname}"

    for _p in ${srcdir}/*.patch
    do
        msg2 "Applying $_p"
        patch -p1 -i $_p
    done

    autoreconf -fi
}

build() {
    cd "${srcdir}/${_pkgname}"

    ./configure \
        --prefix=/usr \
        --sysconfdir=/etc \
        --enable-cgroup \
        --enable-delayacct \
        --enable-openvz \
        --enable-unicode \
        --enable-vserver

    make
}

package() {
    make -C "${srcdir}/${_pkgname}" DESTDIR="$pkgdir" install
}

KoffeinFlummi commented on 2020-12-03 13:24 (UTC)

Fixed. I've used X to replace the newly introduced x keybind for listing file locks.