Add "power" page

Signed-off-by: Hadi <[email protected]>
This commit is contained in:
Hadi
2026-08-13 12:10:09 +02:00
parent d54817d62c
commit 7067717b51
23 changed files with 1005 additions and 20 deletions
+22
View File
@@ -0,0 +1,22 @@
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}
}