mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 01:32:33 +02:00
Init
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package keys
|
||||
|
||||
import (
|
||||
"charm.land/bubbles/v2/key"
|
||||
"github.com/anotherhadi/spilltea/internal/config"
|
||||
)
|
||||
|
||||
type HomeKeyMap struct {
|
||||
Open key.Binding
|
||||
Delete key.Binding
|
||||
Filter key.Binding
|
||||
}
|
||||
|
||||
func newHomeKeyMap(cfg config.HomeKeys) HomeKeyMap {
|
||||
return HomeKeyMap{
|
||||
Open: binding(cfg.Open, "open"),
|
||||
Delete: binding(cfg.Delete, "delete project"),
|
||||
Filter: binding(cfg.Filter, "filter"),
|
||||
}
|
||||
}
|
||||
|
||||
func (h HomeKeyMap) Bindings() []key.Binding {
|
||||
return []key.Binding{h.Open, h.Delete, h.Filter}
|
||||
}
|
||||
Reference in New Issue
Block a user