mirror of
https://github.com/anotherhadi/settuings.git
synced 2026-10-05 08:18:23 +02:00
23 lines
447 B
Go
23 lines
447 B
Go
package keys
|
|
|
|
import (
|
|
"charm.land/bubbles/v2/key"
|
|
"github.com/anotherhadi/settuings/internal/config"
|
|
)
|
|
|
|
type PowerKeyMap struct {
|
|
Select key.Binding
|
|
Refresh key.Binding
|
|
}
|
|
|
|
func newPowerKeyMap(cfg config.PowerKeys) PowerKeyMap {
|
|
return PowerKeyMap{
|
|
Select: binding(cfg.Select, "apply profile"),
|
|
Refresh: binding(cfg.Refresh, "refresh"),
|
|
}
|
|
}
|
|
|
|
func (p PowerKeyMap) Bindings() []key.Binding {
|
|
return []key.Binding{p.Select, p.Refresh}
|
|
}
|