Skip to content

Commit b7d346a

Browse files
authored
Merge pull request #2 from t2ra/main
Update README.md with correct and undocumented keybinds
2 parents 85e38c5 + 0cb85c9 commit b7d346a

File tree

2 files changed

+66
-55
lines changed

2 files changed

+66
-55
lines changed

README.md

Lines changed: 62 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@
1010

1111
You must have **mpv** installed and available in your system path.
1212

13-
* **Ubuntu/Debian:** `sudo apt install mpv`
14-
* **Arch:** `sudo pacman -S mpv`
15-
* **macOS:** `brew install mpv`
13+
- **Ubuntu/Debian:** `sudo apt install mpv`
14+
- **Arch:** `sudo pacman -S mpv`
15+
- **macOS:** `brew install mpv`
1616

1717
### From Releases
1818

1919
You can download pre-compiled binaries for Linux and macOS directly from the [Releases](https://github.com/MattiaPun/SubTUI/releases) page. Simply download the archive for your architecture, extract it, and run the binary.
2020

2121
### Arch Linux (AUR)
2222

23-
You can install SubTUI directly from the AUR: ``yay -S subtui-git``
24-
23+
You can install SubTUI directly from the AUR: `yay -S subtui-git`
2524

2625
### From Source
2726

@@ -38,57 +37,71 @@ go build .
3837
```
3938

4039
## Keybinds
40+
4141
### Global Navigation
42-
| Key | Action |
43-
|----------------- |-------------------------------------------------------- |
44-
| `Tab` | Cycle focus forward (Search → Sidebar → Main → Footer) |
45-
| `Shift` + `Tab` | Cycle focus backward |
46-
| `/` | Focus the Search bar |
47-
| `q` | Quit application (except during Login) |
48-
| `Ctrl` + `c` | Quit application |
42+
43+
| Key | Action |
44+
| --------------- | ------------------------------------------------------ |
45+
| `Tab` | Cycle focus forward (Search → Sidebar → Main → Footer) |
46+
| `Shift` + `Tab` | Cycle focus backward |
47+
| `Backspace` | Back |
48+
| `j` / `Down` | Move selection down |
49+
| `k` / `Up` | Move selection up |
50+
| `q` | Quit application (except during Login) |
51+
| `Ctrl` + `c` | Quit application |
52+
53+
### Search
54+
55+
| Key | Action |
56+
| ------------ | ---------------------------------------------- |
57+
| `/` | Focus the Search bar |
58+
| `Ctrl` + `n` | Cycle filter forward (Songs → Albums → Artist) |
59+
| `Ctrl` + `b` | Cycle filter backward |
4960

5061
### Library & Playlists
51-
| Key | Action |
52-
|-------------- |----------------------------- |
53-
| `j` / `Down` | Move selection down |
54-
| `k` / `Up` | Move selection up |
55-
| `G` | Move selection to bottom |
56-
| `gg` | Move selection to top |
57-
| `ga` | Go to album of selection |
58-
| `gr` | Go to artist of selection |
59-
| `Enter` | Play selection / Open Album |
62+
63+
| Key | Action |
64+
| ------- | --------------------------- |
65+
| `G` | Move selection to bottom |
66+
| `gg` | Move selection to top |
67+
| `ga` | Go to album of selection |
68+
| `gr` | Go to artist of selection |
69+
| `Enter` | Play selection / Open Album |
6070

6171
### Media Controls
62-
| Key | Action |
63-
|-------------- |------------------------------------------ |
64-
| `p` / `P` | Toggle play/pause |
65-
| `j` / `Down` | Move selection down |
66-
| `k` / `Up` | Move selection up |
67-
| `Enter` | Play selection / Open Album |
68-
| `S` | Shuffle Queue (Keeps current song first) |
69-
| `L` | Toggle Loop (None → All → One) |
70-
| `w` | Restart song |
71-
| `.` | Forward 10 seconds |
72-
| `,` | Rewind 10 seconds |
73-
74-
### Starred (liked) songs
75-
| Key | Action |
76-
|----- |-------------------- |
77-
| `f` | Toggle star |
78-
| `F` | Open starred Songs |
72+
73+
| Key | Action |
74+
| --------- | ---------------------------------------- |
75+
| `p` / `P` | Toggle play/pause |
76+
| `n` | Play next song |
77+
| `b` | Play previous song |
78+
| `Enter` | Play selection / Open Album |
79+
| `S` | Shuffle Queue (Keeps current song first) |
80+
| `L` | Toggle Loop (None → All → One) |
81+
| `w` | Restart song |
82+
| `,` | Rewind 10 seconds |
83+
| `;` | Forward 10 seconds |
84+
85+
### Starred (liked) songs
86+
87+
| Key | Action |
88+
| --- | ------------------ |
89+
| `f` | Toggle star |
90+
| `F` | Open starred Songs |
7991

8092
### Queue Management
81-
| Key | Action |
82-
|----- |-------------------------- |
83-
| `N` | Play song next |
84-
| `a` | Add song to queue |
85-
| `d` | Remove song to queue |
86-
| `D` | Clear queue |
87-
| `K` | Move song up (Reorder) |
88-
| `J` | Move song down (Reorder) |
8993

94+
| Key | Action |
95+
| --- | ------------------------ |
96+
| `Q` | Toggle queue |
97+
| `N` | Queue next |
98+
| `a` | Queue last |
99+
| `d` | Remove song from queue |
100+
| `D` | Clear queue |
101+
| `K` | Move song up (Reorder) |
102+
| `J` | Move song down (Reorder) |
90103

91-
## Configuration
104+
## Configuration
92105

93106
On the first launch, SubTUI will ask for your server credentials:
94107

@@ -98,13 +111,11 @@ On the first launch, SubTUI will ask for your server credentials:
98111

99112
**Security Note**: Your credentials are stored in plaintext in `~/.config/subtui/config.yaml`.
100113

101-
## Screenshots
114+
## Screenshots
102115

103116
![Login](./screenshots/login.png)
104117
![Queue](./screenshots/queue_view.png)
105118

106-
107-
108119
## Contributing
109120

110121
Contributions are welcome!
@@ -117,4 +128,4 @@ Contributions are welcome!
117128

118129
## License
119130

120-
Distributed under the MIT License. See `LICENSE` for more information.
131+
Distributed under the MIT License. See `LICENSE` for more information.

internal/ui/update.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
123123
m = mediaRestartSong(m)
124124

125125
case ",":
126-
m = mediaSeekForward(m)
126+
m = mediaSeekRewind(m)
127127

128128
case ";":
129-
m = mediaSeekRewind(m)
129+
m = mediaSeekForward(m)
130130

131131
case "S":
132132
m = mediaShuffle(m)
@@ -708,15 +708,15 @@ func mediaRestartSong(m model) model {
708708

709709
func mediaSeekForward(m model) model {
710710
if m.focus != focusSearch {
711-
player.Back10Seconds()
711+
player.Forward10Seconds()
712712
}
713713

714714
return m
715715
}
716716

717717
func mediaSeekRewind(m model) model {
718718
if m.focus != focusSearch {
719-
player.Forward10Seconds()
719+
player.Back10Seconds()
720720
}
721721

722722
return m

0 commit comments

Comments
 (0)