Skip to content

Commit

Permalink
feat: add help for mwheel scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
whoop-t committed Jul 7, 2023
1 parent 353e1ab commit f090f26
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"syscall"
"time"

"github.com/charmbracelet/bubbles/key"
"github.com/charmbracelet/bubbles/list"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
Expand Down Expand Up @@ -197,6 +198,21 @@ func main() {
m.list.SetStatusBarItemName("process", "processes")
//Hide default list title + styles
m.list.SetShowTitle(false)
mwheel :=
key.NewBinding(
key.WithKeys("mwheel"),
key.WithHelp("mwheel", "up/down"),
)
m.list.AdditionalShortHelpKeys = func() []key.Binding {
return []key.Binding{
mwheel,
}
}
m.list.AdditionalFullHelpKeys = func() []key.Binding {
return []key.Binding{
mwheel,
}
}
m.title = initTitle()

// Let 'er rip
Expand Down

0 comments on commit f090f26

Please sign in to comment.