From 65adf9b9c39ec69e26703f089f5f108226b0bd4b Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Mon, 28 Apr 2025 16:27:08 +0100 Subject: [PATCH] Add auto-invert option to icon fields --- internal/glance/config-fields.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/glance/config-fields.go b/internal/glance/config-fields.go index 5ca6fb6..1a0a701 100644 --- a/internal/glance/config-fields.go +++ b/internal/glance/config-fields.go @@ -128,10 +128,16 @@ type customIconField struct { } func newCustomIconField(value string) customIconField { + const autoInvertPrefix = "auto-invert " field := customIconField{} prefix, icon, found := strings.Cut(value, ":") if !found { + if strings.HasPrefix(value, autoInvertPrefix) { + field.IsFlatIcon = true + value = strings.TrimPrefix(value, autoInvertPrefix) + } + field.URL = template.URL(value) return field }