diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-24 13:04:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-24 13:04:11 -0500 |
commit | 218931d6ba6f33f023aa9dc921d0aa0aca5a9f12 (patch) | |
tree | 92089835c75f36318c81253d67cf89b18b75f774 /internal/slider | |
parent | ef65550765215416195ad1a456408db781e752fd (diff) |
feat: add help at the bottom (#5)
* Attemp at using goreleaser
* Fix syntax error in .goreleaser.yml
* fix: Check roadmap feature for clipboard (README)
* feat: add help menu at the bottom (#4)
* MVP for a help menu
* fix: commented code is evil
Diffstat (limited to 'internal/slider')
-rw-r--r-- | internal/slider/keys.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/internal/slider/keys.go b/internal/slider/keys.go index 9f96903..026ea1b 100644 --- a/internal/slider/keys.go +++ b/internal/slider/keys.go @@ -7,26 +7,25 @@ type keybinds struct { decRegular key.Binding incPrecise key.Binding decPrecise key.Binding - // quitApp key.Binding } func newKeybinds() keybinds { return keybinds{ incRegular: key.NewBinding( key.WithKeys("right", "l"), - key.WithHelp("l", "Increase (coarse)"), + key.WithHelp("l", "inc. (coarse)"), ), decRegular: key.NewBinding( key.WithKeys("left", "h"), - key.WithHelp("h", "Decrease (coarse)"), + key.WithHelp("h", "dec. (coarse)"), ), incPrecise: key.NewBinding( key.WithKeys("shift+right", "L"), - key.WithHelp("L", "Increase (fine)"), + key.WithHelp("L", "inc. (fine)"), ), decPrecise: key.NewBinding( key.WithKeys("shift+left", "H"), - key.WithHelp("H", "Decrease (fine)"), + key.WithHelp("H", "dec. (fine)"), ), } } @@ -47,6 +46,6 @@ func Keys() []key.Binding { // AllKeys returns key.Bindings for the Model // and all of its active children. The parent // can use this to generate help text. -func (m Model) AllKeys() []key.Binding { - return Keys() +func (m Model) AllKeys() [][]key.Binding { + return [][]key.Binding{Keys()} } |