Documentation
¶
Overview ¶
Package settings manages global and per-key plugin settings.
Index ¶
Constants ¶
View Source
const DefaultRefreshMinutes = 15
Variables ¶
View Source
var RefreshPresets = []int{5, 10, 15, 30, 60}
RefreshPresets are the allowed refresh intervals in minutes.
Functions ¶
func InvertFillEnabled ¶
func InvertFillEnabled() bool
InvertFillEnabled returns the global invert-fill toggle.
func ResolveRefreshMs ¶
func ResolveRefreshMs(ks KeySettings) int64
ResolveRefreshMs returns the effective refresh interval in ms for a key.
func ShowGlyphsEnabled ¶
func ShowGlyphsEnabled() bool
ShowGlyphsEnabled returns the global show-glyphs toggle.
func SkipUpdateCheckEnabled ¶
func SkipUpdateCheckEnabled() bool
SkipUpdateCheckEnabled returns the skip-update-check toggle.
Types ¶
type GlobalSettings ¶
type GlobalSettings struct {
DefaultRefreshMinutes *int `json:"defaultRefreshMinutes,omitempty"`
DefaultValueSize TextSize `json:"defaultValueSize,omitempty"`
DefaultSubvalueSize TextSize `json:"defaultSubvalueSize,omitempty"`
InvertFill bool `json:"invertFill,omitempty"`
ShowGlyphs *bool `json:"showGlyphs,omitempty"`
SkipUpdateCheck bool `json:"skipUpdateCheck,omitempty"`
}
GlobalSettings are shared across every key and persisted by Stream Deck (survive plugin rebuilds, ride with user profiles).
type KeySettings ¶
type KeySettings struct {
// Provider is now derived from action UUID; this field is
// kept for backwards compat but ignored.
ProviderID string `json:"providerId,omitempty"`
MetricID string `json:"metricId,omitempty"`
RefreshMinutes *int `json:"refreshMinutes,omitempty"`
WarnBelow *float64 `json:"warnBelow,omitempty"`
CriticalBelow *float64 `json:"criticalBelow,omitempty"`
WarnColor string `json:"warnColor,omitempty"`
CriticalColor string `json:"criticalColor,omitempty"`
LabelOverride string `json:"labelOverride,omitempty"`
HideLabel bool `json:"hideLabel,omitempty"`
CaptionOverride string `json:"captionOverride,omitempty"`
FillColor string `json:"fillColor,omitempty"`
BgColor string `json:"bgColor,omitempty"`
TextColor string `json:"textColor,omitempty"`
FillDirection string `json:"fillDirection,omitempty"`
ValueSize TextSize `json:"valueSize,omitempty"`
SubvalueSize TextSize `json:"subvalueSize,omitempty"`
ShowBorder *bool `json:"showBorder,omitempty"`
ShowGlyph *bool `json:"showGlyph,omitempty"`
ShowResetTimer *bool `json:"showResetTimer,omitempty"`
ShowRawCounts *bool `json:"showRawCounts,omitempty"`
}
KeySettings are per-button settings stored by Stream Deck.
type TextSize ¶
type TextSize string
func DefaultSubvalueSz ¶
func DefaultSubvalueSz() TextSize
DefaultSubvalueSz returns the global default subvalue text size.
func DefaultValueSz ¶
func DefaultValueSz() TextSize
DefaultValueSz returns the global default value text size.
Click to show internal directories.
Click to hide internal directories.