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.003427
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 »

Hekuran commented on 2020-11-27 13:17 (UTC) (edited on 2020-11-29 10:21 (UTC) by Hekuran)

Here is the update: https://pastebin.com/raw/pEetD1uJ

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

diff --git a/PKGBUILD b/PKGBUILD
index d1fbc5e..14c02ea 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ options=('!emptydirs')
 source=("git+${url}.git"
         'vim-keybindings.patch')
 sha256sums=('SKIP'
-            '66c2881bae50cb0a7d26bc390977be5aa20576dfa044b8f74c4dc85779b98865')
+            'f43a9d4ecc11b6682618bde10a83b7e4c2ae0f911571df8602fb8d7a1d06c758')

 pkgver() {
     cd "${srcdir}/${_pkgname}"
diff --git a/vim-keybindings.patch b/vim-keybindings.patch
index 2ffea83..136f9c0 100644
--- a/vim-keybindings.patch
+++ b/vim-keybindings.patch
@@ -1,17 +1,17 @@
 diff --git a/Action.c b/Action.c
-index 5b68811..3c5a296 100644
+index 47fa6f1..202a774 100644
 --- a/Action.c
 +++ b/Action.c
-@@ -404,7 +404,7 @@ static Htop_Reaction actionTogglePauseProcessUpdate(State *st) {
- }
- 
- static const struct { const char* key; const char* info; } helpLeft[] = {
+@@ -449,7 +449,7 @@ static const struct {
+    const char* key;
+    const char* info;
+ } helpLeft[] = {
 -   { .key = " Arrows: ", .info = "scroll process list" },
-+   { .key = "   hjkl: ", .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" },
-@@ -426,7 +426,7 @@ static const struct { const char* key; const char* info; } helpRight[] = {
+@@ -475,7 +475,7 @@ static const struct {
     { .key = "  Space: ", .info = "tag process" },
     { .key = "      c: ", .info = "tag process and its children" },
     { .key = "      U: ", .info = "untag all processes" },
@@ -20,11 +20,12 @@ index 5b68811..3c5a296 100644
     { .key = "   F7 ]: ", .info = "higher priority (root only)" },
     { .key = "   F8 [: ", .info = "lower priority (+ nice)" },
  #if (defined(HAVE_LIBHWLOC) || defined(HAVE_LINUX_AFFINITY))
-@@ -434,11 +434,11 @@ static const struct { const char* key; const char* info; } helpRight[] = {
+@@ -483,12 +483,11 @@ 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 = "      s: ", .info = "trace syscalls with strace" },
     { .key = "      w: ", .info = "wrap process command in multiple lines" },
@@ -34,7 +35,7 @@ index 5b68811..3c5a296 100644
     { .key = "  F10 q: ", .info = "quit" },
     { .key = NULL, .info = NULL }
  };
-@@ -601,6 +601,7 @@ void Action_setBindings(Htop_Action* keys) {
+@@ -663,6 +662,7 @@ void Action_setBindings(Htop_Action* keys) {
     keys['I'] = actionInvertSortOrder;
     keys[KEY_F(6)] = actionExpandCollapseOrSortColumn;
     keys[KEY_F(18)] = actionExpandCollapseOrSortColumn;
@@ -42,7 +43,7 @@ index 5b68811..3c5a296 100644
     keys['<'] = actionSetSortColumn;
     keys[','] = actionSetSortColumn;
     keys['>'] = actionSetSortColumn;
-@@ -609,7 +610,7 @@ void Action_setBindings(Htop_Action* keys) {
+@@ -671,7 +671,7 @@ void Action_setBindings(Htop_Action* keys) {
     keys['q'] = actionQuit;
     keys['a'] = actionSetAffinity;
     keys[KEY_F(9)] = actionKill;
@@ -51,10 +52,11 @@ index 5b68811..3c5a296 100644
     keys[KEY_RECLICK] = actionExpandOrCollapse;
     keys['+'] = actionExpandOrCollapse;
     keys['='] = actionExpandOrCollapse;
-@@ -620,12 +621,11 @@ void Action_setBindings(Htop_Action* keys) {
+@@ -682,13 +682,11 @@ void Action_setBindings(Htop_Action* keys) {
     keys['S'] = actionSetup;
     keys['C'] = actionSetup;
     keys[KEY_F(2)] = actionSetup;
+-   keys['x'] = actionShowLocks;
 -   keys['l'] = actionLsof;
 +   keys['L'] = actionLsof;
     keys['s'] = actionStrace;
@@ -66,10 +68,10 @@ index 5b68811..3c5a296 100644
     keys['U'] = actionUntagAll;
     keys['c'] = actionTagAllChildren;
 diff --git a/Panel.c b/Panel.c
-index ab3f600..85e8f28 100644
+index 68a245e..f722d7b 100644
 --- a/Panel.c
 +++ b/Panel.c
-@@ -319,10 +319,12 @@ bool Panel_onKey(Panel* this, int key) {
+@@ -329,10 +329,12 @@ bool Panel_onKey(Panel* this, int key) {
     int size = Vector_size(this->items);
     switch (key) {
     case KEY_DOWN:
@@ -82,7 +84,7 @@ index ab3f600..85e8f28 100644
     case KEY_CTRL('P'):
        this->selected--;
        break;
-@@ -337,23 +339,33 @@ bool Panel_onKey(Panel* this, int key) {
+@@ -347,23 +349,33 @@ bool Panel_onKey(Panel* this, int key) {
        break;
     #endif
     case KEY_LEFT:
@@ -118,7 +120,7 @@ index ab3f600..85e8f28 100644
        this->selected += (this->h - 1);
        this->scrollV = MAXIMUM(0, MINIMUM(Vector_size(this->items) - this->h,
                                   this->scrollV + this->h - 1));
-@@ -375,9 +387,11 @@ bool Panel_onKey(Panel* this, int key) {
+@@ -385,9 +397,11 @@ bool Panel_onKey(Panel* this, int key) {
        break;
     }
     case KEY_HOME:
@@ -183,10 +185,10 @@ index 880597d..54283bc 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 bc5f66a..41b03e0 100644
+index 87746c7..bbfa1a3 100644
 --- a/ScreenManager.c
 +++ b/ScreenManager.c
-@@ -257,7 +257,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
+@@ -255,7 +255,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
           continue;
        }
        case KEY_LEFT:
@@ -195,8 +197,8 @@ index bc5f66a..41b03e0 100644
           if (this->panelCount < 2) {
              goto defaultHandler;
           }
-@@ -271,7 +271,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
-             goto tryLeft;
+@@ -276,7 +276,7 @@ tryLeft:
+ 
           break;
        case KEY_RIGHT:
 -      case KEY_CTRL('F'):

mmkodali commented on 2020-11-18 07:31 (UTC)

build giving following errors.

patching file Action.c
Hunk #1 FAILED at 404.
Hunk #2 succeeded at 465 (offset 39 lines).
Hunk #3 FAILED at 434.
Hunk #4 succeeded at 652 (offset 51 lines).
Hunk #5 succeeded at 661 (offset 51 lines).
Hunk #6 FAILED at 621.
3 out of 6 hunks FAILED -- saving rejects to file Action.c.rej
patching file Panel.c
Hunk #1 succeeded at 329 (offset 10 lines).
Hunk #2 succeeded at 349 (offset 10 lines).
Hunk #3 succeeded at 397 (offset 10 lines).
patching file README
patching file ScreenManager.c
Hunk #1 succeeded at 264 (offset 7 lines).
Hunk #2 succeeded at 285 with fuzz 1 (offset 14 lines).
==> ERROR: A failure occurred in prepare().
    Aborting...

KoffeinFlummi commented on 2020-11-02 22:11 (UTC)

Thanks for your effort. I updated my repo and the patch, and applied your patch (with some minor changes) to the PKGBUILD and named you as the author.

Hekuran commented on 2020-11-02 11:39 (UTC)

There are some dependency changes. I made the build taking the htop package as a template, and did the changes that you, did. (pretty autistic, but very clean) Here's a diff to fix it:

diff --git a/PKGBUILD b/PKGBUILD
index b20e61c..67792a7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,23 +2,23 @@

 _pkgname=htop
 pkgname=${_pkgname}-vim-git
-pkgver=1417.dc6523b
+pkgver=1536.15652e7
 pkgrel=1
 pkgdesc="Interactive text-mode process viewer. Patched for vim keybindings"
+arch=('any')
 url="https://github.com/htop-dev/${_pkgname}"
 license=('GPL')
-arch=('i686' 'x86_64' 'armv7h')
-depends=('ncurses')
-makedepends=('git' 'python2')
-optdepends=('lsof: list open files for running process'
-            'strace: attach to running process')
+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"
         'vim-keybindings.patch')
 sha256sums=('SKIP'
-            'c15ecb884c65d3c168923728816157fc4a2dc80df6190fb46b2484a16d201d3a')
+            'ef0bbe1981e66581cbc2f53976938323f1f42bd89aac3651c51368b5524f3ee1')

 pkgver() {
     cd "${srcdir}/${_pkgname}"
@@ -27,31 +27,32 @@ pkgver() {
 }

 prepare() {
-    cd "${srcdir}/${_pkgname}"
+   cd "${srcdir}/${_pkgname}"
+
+   for _p in ${srcdir}/*.patch
+   do
+       msg2 "Applying $_p"
+       patch -p1 -i $_p
+   done

-    for _p in ${srcdir}/*.patch
-    do
-        msg2 "Applying $_p"
-        patch -p1 -i $_p
-    done
-
-    ./autogen.sh
-
-    ./configure \
-        --prefix=/usr \
-        --sysconfdir=/etc \
-        --enable-unicode \
-        --enable-openvz \
-        --enable-vserver \
-        --enable-cgroup
+   autoreconf -fi
 }

 build() {
-    cd "${srcdir}/${_pkgname}"
-    make
+  cd "${srcdir}/${_pkgname}"
+
+  ./configure \
+      --prefix=/usr \
+      --sysconfdir=/etc \
+      --enable-cgroup \
+      --enable-delayacct \
+      --enable-openvz \
+      --enable-unicode \
+      --enable-vserver
+
+  make
 }

 package() {
-    cd "${srcdir}/${_pkgname}"
-    make DESTDIR="${pkgdir}" install
+    make -C "${srcdir}/${_pkgname}" DESTDIR="$pkgdir" install
 }
diff --git a/vim-keybindings.patch b/vim-keybindings.patch
index ff89998..b60f105 100644
--- a/vim-keybindings.patch
+++ b/vim-keybindings.patch
@@ -4,7 +4,7 @@ index 233f132..c885197 100644
 +++ b/Action.c
 @@ -393,7 +393,7 @@ static Htop_Reaction actionRedraw(ATTR_UNUSED State *st) {
  }
- 
+
  static const struct { const char* key; const char* info; } helpLeft[] = {
 -   { .key = " Arrows: ", .info = "scroll process list" },
 +   { .key = "   hjkl: ", .info = "scroll process list" },
@@ -26,8 +26,8 @@ index 233f132..c885197 100644
     { .key = "      i: ", .info = "set IO priority" },
 -   { .key = "      l: ", .info = "list open files with lsof" },
 +   { .key = "      L: ", .info = "list open files with lsof" },
-    { .key = "      M: ", .info = "show process command in multiple lines" },
     { .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" },
@@ -135,9 +135,9 @@ index 67f80ef..84f90d7 100644
 --- a/README
 +++ b/README
 @@ -17,6 +17,47 @@ 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
 +----------------
 +
@@ -180,7 +180,7 @@ index 67f80ef..84f90d7 100644
 +-------------------------------------------
 +
  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 2a2cb1d..705ae17 100644

Ram-Z commented on 2020-10-17 13:00 (UTC)

Here's a diff to fix current patch failures:

diff --git a/PKGBUILD b/PKGBUILD
index b20e61c..1aa8dc4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@

 _pkgname=htop
 pkgname=${_pkgname}-vim-git
-pkgver=1417.dc6523b
+pkgver=1464.7cd093c
 pkgrel=1
 pkgdesc="Interactive text-mode process viewer. Patched for vim keybindings"
 url="https://github.com/htop-dev/${_pkgname}"
@@ -18,7 +18,7 @@ options=('!emptydirs')
 source=("git+${url}.git"
         'vim-keybindings.patch')
 sha256sums=('SKIP'
-            'c15ecb884c65d3c168923728816157fc4a2dc80df6190fb46b2484a16d201d3a')
+            '59309799d367d6582b06ae8bb87e52085f166f5a329c28854939d066428dd47e')

 pkgver() {
     cd "${srcdir}/${_pkgname}"
diff --git a/vim-keybindings.patch b/vim-keybindings.patch
index ff89998..b7bc7c6 100644
--- a/vim-keybindings.patch
+++ b/vim-keybindings.patch
@@ -26,8 +26,8 @@ index 233f132..c885197 100644
     { .key = "      i: ", .info = "set IO priority" },
 -   { .key = "      l: ", .info = "list open files with lsof" },
 +   { .key = "      L: ", .info = "list open files with lsof" },
-    { .key = "      M: ", .info = "show process command in multiple lines" },
     { .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" },

tzurita commented on 2020-10-12 14:32 (UTC) (edited on 2020-10-12 14:35 (UTC) by tzurita)

clean build fails with gcc > 10

==> Starting prepare()...
  -> Applying /home/zuritat/.cache/yay/htop-vim-git/src/vim- 
   keybindings.patch
    patching file Action.c
    Hunk #1 succeeded at 400 (offset 7 lines).
    Hunk #2 succeeded at 422 (offset 8 lines).
    Hunk #3 FAILED at 422.
    Hunk #4 succeeded at 574 (offset 8 lines).
    Hunk #5 succeeded at 583 (offset 8 lines).
    Hunk #6 succeeded at 594 (offset 8 lines).
    1 out of 6 hunks FAILED -- saving rejects to file Action.c.rej
    patching file Panel.c
    patching file README
    patching file ScreenManager.c
    Hunk #1 succeeded at 256 (offset 6 lines).
    Hunk #2 succeeded at 270 (offset 6 lines).
    ==> ERROR: A failure occurred in prepare().
    Aborting...
    error making: htop-vim-git

KoffeinFlummi commented on 2020-10-05 22:32 (UTC)

Updated with new upstream repo.

KoffeinFlummi commented on 2020-05-29 00:07 (UTC)

Failure was present on upstream as well because of an incompatibility with gcc 10. Fixed on my fork.

oibind commented on 2020-05-22 17:31 (UTC)

Fails on build.

armanleftarm commented on 2018-01-28 03:34 (UTC)

Add armv7h to the arch, builds proper on Samsung XE303C12