Skip to content

Commit

Permalink
bpytop: fix issue where Enter key doesn't register on some systems
Browse files Browse the repository at this point in the history
  • Loading branch information
herbygillot and neverpanic committed Mar 14, 2024
1 parent 9279cdc commit 6f8a282
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sysutils/bpytop/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PortGroup makefile 1.0

github.setup aristocratos bpytop 1.0.68 v
github.tarball_from archive
revision 1
revision 2

description \
Linux/macOS/FreeBSD resource monitor
Expand Down Expand Up @@ -35,6 +35,8 @@ depends_run-append port:python${python_version} \

makefile.has_destdir yes

patchfiles-append patch-pr413.diff

post-patch {
reinplace "s|/usr/bin/env python3|${python_bin}|" ${worksrcpath}/bpytop.py
}
Expand Down
12 changes: 12 additions & 0 deletions sysutils/bpytop/files/patch-pr413.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://github.com/aristocratos/bpytop/pull/413
--- bpytop.py 2021-12-22 14:22:48
+++ bpytop.py 2024-03-14 02:13:56
@@ -840,7 +840,7 @@
mouse: Dict[str, List[List[int]]] = {}
mouse_pos: Tuple[int, int] = (0, 0)
escape: Dict[Union[str, Tuple[str, str]], str] = {
- "\n" : "enter",
+ ("\n", "\r") : "enter",
("\x7f", "\x08") : "backspace",
("[A", "OA") : "up",
("[B", "OB") : "down",

0 comments on commit 6f8a282

Please sign in to comment.