From 9916d2c7b8c793c9668275bf601fe7ddc1a7475f Mon Sep 17 00:00:00 2001 From: Jonas Frei Date: Tue, 21 Jan 2020 21:39:06 +0100 Subject: [PATCH] Changed 'seek' keybinding to match ncmpcpp and added fast-seek --- README.md | 3 ++- src/commands.rs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0b7bb74..8a5e232 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,8 @@ have them configurable. * `Shift-s` stops a track * `Shift-u` updates the library cache (tracks, artists, albums, playlists) * `<` and `>` play the previous or next track -* `,` and `.` to rewind or skip forward +* `f` and `b` to seek forward or backward +* `Shift-f` and `Shift-b` to seek forward or backward in steps of 10s * `-` and `+` decrease or increase the volume * `r` to toggle repeat mode * `z` to toggle shuffle playback diff --git a/src/commands.rs b/src/commands.rs index 4cfebd0..ee7ee22 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -211,8 +211,10 @@ impl CommandManager { kb.insert("Ctrl+s".into(), Command::SaveQueue); kb.insert("d".into(), Command::Delete); kb.insert("/".into(), Command::Focus("search".into())); - kb.insert(".".into(), Command::Seek(SeekDirection::Relative(500))); - kb.insert(",".into(), Command::Seek(SeekDirection::Relative(-500))); + kb.insert("f".into(), Command::Seek(SeekDirection::Relative(1000))); + kb.insert("b".into(), Command::Seek(SeekDirection::Relative(-1000))); + kb.insert("Shift+f".into(), Command::Seek(SeekDirection::Relative(10000))); + kb.insert("Shift+b".into(), Command::Seek(SeekDirection::Relative(-10000))); kb.insert("+".into(), Command::VolumeUp); kb.insert("-".into(), Command::VolumeDown); kb.insert("r".into(), Command::Repeat(None));