From ff204655d39b36403435d582f1bf5f37fc78099b Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Tue, 20 Oct 2026 21:44:05 +0200 Subject: [PATCH] Swap the Library and Downloads views (F3 Library, F4 Downloads) Co-Authored-By: Claude Sonnet 5.5 --- README.md | 2 +- SPECS.md | 4 ++-- internal/ui/app.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3f7076f..3b6dd38 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Keep the file private (`chmod 600`); it holds your API keys. | Key | Action | |---|---| -| `F1`–`F4` | switch view | +| `F1`–`F5` | switch view (Movies, Series, Library, Downloads, Log) | | `Tab`, `Shift+Tab` | switch panel within a view | | `?` / `F9` | help | | `/` | focus search box | diff --git a/SPECS.md b/SPECS.md index 046c521..7802e46 100644 --- a/SPECS.md +++ b/SPECS.md @@ -83,7 +83,7 @@ Layout sketch (Library view; the other views follow the same frame): ``` ┌ arr-tui ───────────────────────────────────────────────────────────┐ -│ 1 Movies 2 Series 3 Downloads 4 Library 5 Log ● Radarr ● Sonarr ● SAB │ ← tab bar + connection state +│ 1 Movies 2 Series 3 Library 4 Downloads 5 Log ● Radarr ● Sonarr ● SAB │ ← tab bar + connection state │ Library · Movies 12/40 · Series 5/9 · filter: missing │ │ Filter: ______________________ │ ├─ Movies ───────────────────────┬─ Details ─────────────────────────┤ @@ -105,7 +105,7 @@ Keybindings (the status bar shows the ones that apply to the current view): | Key | Action | |---|---| -| `F1-F5` | Switch view (Movies, Series, Downloads, Library, Log); also while typing, and from full-screen views. Dialogs block them. | +| `F1-F5` | Switch view (Movies, Series, Library, Downloads, Log); also while typing, and from full-screen views. Dialogs block them. | | `Tab` / `Shift+Tab` | Switch panel within the current view (never the view): search box / results, Downloads panels, Library lists | | `?` / `F9` | Help (`F9` also works while typing) | | `q` / `Ctrl+C` | Quit | diff --git a/internal/ui/app.go b/internal/ui/app.go index e336934..c0e1113 100644 --- a/internal/ui/app.go +++ b/internal/ui/app.go @@ -111,8 +111,8 @@ func New(cfg *config.Config) *App { a.views = []view{ {key: '1', name: "Movies", body: newSearchView(a, radarrBackend{radarrClient}, cfg.Radarr).root, hints: searchHints}, {key: '2', name: "Series", body: newSearchView(a, sonarrBackend{sonarrClient}, cfg.Sonarr).root, hints: searchHints}, - {key: '3', name: "Downloads", body: downloads.root, onShow: downloads.activate, onHide: downloads.deactivate, hints: downloads.hints}, - {key: '4', name: "Library", body: library.root, onShow: library.activate, hints: libraryHints}, + {key: '3', name: "Library", body: library.root, onShow: library.activate, hints: libraryHints}, + {key: '4', name: "Downloads", body: downloads.root, onShow: downloads.activate, onHide: downloads.deactivate, hints: downloads.hints}, {key: '5', name: "Log", body: a.logs.root, onShow: a.logs.onShow, hints: logHints}, } for i, v := range a.views { @@ -356,7 +356,7 @@ func (a *App) handleKey(ev *tcell.EventKey) *tcell.EventKey { return ev } -// viewShortcut returns the view index for F1-F4, or -1. +// viewShortcut returns the view index for F1-F5, or -1. func (a *App) viewShortcut(ev *tcell.EventKey) int { if ev.Key() >= tcell.KeyF1 && ev.Key() <= tcell.KeyF12 { return int(ev.Key() - tcell.KeyF1)