diff --git a/cmd/streamdeck/config.go b/cmd/streamdeck/config.go index 0354771..a7c22d0 100644 --- a/cmd/streamdeck/config.go +++ b/cmd/streamdeck/config.go @@ -12,7 +12,7 @@ type config struct { } type page struct { - Keys []keyDefinition `yaml:"keys"` + Keys map[int]keyDefinition `yaml:"keys"` } type keyDefinition struct { diff --git a/cmd/streamdeck/system_pages.go b/cmd/streamdeck/system_pages.go index 8bf2c5a..1f29759 100644 --- a/cmd/streamdeck/system_pages.go +++ b/cmd/streamdeck/system_pages.go @@ -1,14 +1,6 @@ package main func applySystemPages(conf *config) { - blankKey := keyDefinition{ - Display: dynamicElement{Type: "color", Attributes: map[string]interface{}{"rgba": []interface{}{0x0, 0x0, 0x0, 0xff}}}, - Actions: []dynamicElement{{Type: "page", Attributes: map[string]interface{}{"name": conf.DefaultPage}}}, - } - blankPage := page{} - for len(blankPage.Keys) < sd.NumKeys() { - blankPage.Keys = append(blankPage.Keys, blankKey) - } conf.Pages["@@blank"] = blankPage }