commit 3543983ca19ae78aeda2935f32fb2d7dd2632ea3
parent 7558a6f0cd27867174f9cc66cd2b057a11524d5c
Author: Luxferre <lux@ferre>
Date: Sun, 2 Apr 2023 18:09:13 +0300
Added page refresh functionality
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -74,6 +74,7 @@ No. Besides the ambiguity problem, it will also introduce huge external dependen
- Link navigation (keyboard): s - focus on the next link, w - focus on the previous link, Enter/Space - visit the focused link (or download if it points to a binary file), d - force-download the contents of the link
- Link navigation (mouse, if supported): left click on the link - focus and visit (or download if it points to a binary file), middle click - focus and force-download the contents
- Go back: b or right mouse click anywhere (if supported)
+- Refresh the page: r
- Stash the link to the currently open resource: S (shift+s)
- Quit the browser: q
diff --git a/bopher-ng.sh b/bopher-ng.sh
@@ -379,6 +379,7 @@ while true; do
[[ "$cmdbuf" == '[B' || "$cmdbuf" == 'j' || "$mousecmd" == '65' ]] && scroll 1
[[ "$cmdbuf" == '[5' || "$cmdbuf" == 'h' ]] && scroll $(( 1 - $TERMROWS )) # PgUp
[[ "$cmdbuf" == '[6' || "$cmdbuf" == 'l' ]] && scroll $(( $TERMROWS - 1 )) # PgDn
+ [[ "$cmdbuf" == 'r' ]] && amload "$CURRENTAM" # refresh the page without updating history
[[ "$cmdbuf" == 's' ]] && jumplink 1
[[ "$cmdbuf" == 'w' ]] && jumplink -1
[[ "$cmdbuf" == 'q' ]] && printf '%s' "$ERESET$ALTBUFOFF" && exit 0