aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2024-03-06 03:08:54 -0700
committerkatherine <ageha@airen-no-jikken.icu>2024-03-06 03:08:54 -0700
commit0c290cf90b825252a91c15decd36fc6dd8f0b95b (patch)
tree39947c2338733c191488d0f36aa39f71b51f904b
parent8d527788821faee1a2f961d576997351cd68767d (diff)
downloadbk-master.tar.gz
dumb forkHEADmaster
use for now until bk has config and such
-rw-r--r--PKGBUILD20
-rw-r--r--README.md2
-rw-r--r--src/view.rs16
3 files changed, 30 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..99f598e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,20 @@
+pkgname=bk
+pkgver=0.6.0_fork
+pkgrel=1
+pkgdesk="terminal epub reader (fork)"
+arch=('i686' 'x86_64')
+url="https://github.com/aeosynth/bk"
+license=('MIT')
+makedepends=('rust')
+source=()
+
+build() {
+ cd ..
+ cargo build
+}
+
+package() {
+ cd ..
+ install -D -t "$pkgdir/usr/bin" target/debug/bk
+ strip -x --strip-unneeded "$pkgdir/usr/bin/bk"
+}
diff --git a/README.md b/README.md
index 21648eb..19176f0 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
# bk
bk is a terminal EPUB reader, written in Rust.
+(dumb fork with keybindings changed
+
# Features
- Cross platform - Linux, macOS and Windows support
- Single binary, instant startup
diff --git a/src/view.rs b/src/view.rs
index 8194132..7f490c3 100644
--- a/src/view.rs
+++ b/src/view.rs
@@ -152,12 +152,12 @@ impl View for Toc {
bk.cursor = 0;
bk.view = &Page;
}
- Down | Char('j') => self.next(bk, 1),
- Up | Char('k') => self.prev(bk, 1),
+ Down => self.next(bk, 1),
+ Up => self.prev(bk, 1),
Home | Char('g') => self.prev(bk, bk.chapters.len()),
End | Char('G') => self.next(bk, bk.chapters.len()),
- PageDown | Char('f') => self.next(bk, bk.rows),
- PageUp | Char('b') => self.prev(bk, bk.rows),
+ PageDown | Char('j' | 'f') => self.next(bk, bk.rows),
+ PageUp | Char('k' | 'b') => self.prev(bk, bk.rows),
Char('d') => self.next(bk, bk.rows / 2),
Char('u') => self.prev(bk, bk.rows / 2),
_ => (),
@@ -300,12 +300,12 @@ impl View for Page {
}
Char('d') => self.scroll_down(bk, bk.rows / 2),
Char('u') => self.scroll_up(bk, bk.rows / 2),
- Up | Char('k') => self.scroll_up(bk, 3),
- Left | PageUp | Char('b' | 'h') => {
+ Up => self.scroll_up(bk, 3),
+ Left | PageUp | Char('k' | 'b') => {
self.scroll_up(bk, bk.rows);
}
- Down | Char('j') => self.scroll_down(bk, 3),
- Right | PageDown | Char('f' | 'l' | ' ') => self.scroll_down(bk, bk.rows),
+ Down => self.scroll_down(bk, 3),
+ Right | PageDown | Char('j' | 'f' | ' ') => self.scroll_down(bk, bk.rows),
Char('[') => self.prev_chapter(bk),
Char(']') => self.next_chapter(bk),
_ => (),