From 218931d6ba6f33f023aa9dc921d0aa0aca5a9f12 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 24 Nov 2024 13:04:11 -0500 Subject: 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 --- internal/slider/keys.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'internal/slider') 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()} } -- cgit v1.2.3