Text overlay support

This commit is contained in:
2026-04-18 11:38:16 -06:00
parent 44dc22d8ee
commit 962ee747fd
7 changed files with 495 additions and 33 deletions

View File

@@ -22,8 +22,10 @@ type PollConfig struct {
// KeyConfig defines what a single Stream Deck key does.
type KeyConfig struct {
Icon string `yaml:"icon"` // filename relative to icons_dir (regular keys)
Command string `yaml:"command"` // shell command to run on press
Icon string `yaml:"icon"` // filename relative to icons_dir (regular keys)
Text string `yaml:"text"` // text overlay on the key (auto-sized, supports newlines)
TextColor string `yaml:"text_color"` // text color: "white" (default), "black", "red", "blue", or hex "#RRGGBB"
Command string `yaml:"command"` // shell command to run on press
// Toggle/status keys: show different icons based on polled state.
IconTrue string `yaml:"icon_true"` // icon when poll match is true

View File

@@ -87,6 +87,12 @@ func (sd *StreamDeck) Close() error {
// KeyCount returns the number of keys on this device.
func (sd *StreamDeck) KeyCount() int { return sd.model.KeyCount }
// ImageWidth returns the pixel width of key images for this device.
func (sd *StreamDeck) ImageWidth() int { return sd.model.ImageWidth }
// ImageHeight returns the pixel height of key images for this device.
func (sd *StreamDeck) ImageHeight() int { return sd.model.ImageHeight }
// Reset clears all key images and returns the device to its default state.
func (sd *StreamDeck) Reset() error {
report := make([]byte, 32)