diff --git a/config.go b/config.go index 62bda63..ef2c862 100644 --- a/config.go +++ b/config.go @@ -120,6 +120,7 @@ type MyConfig struct { Instance string `json:"instance,omitempty"` Class string `json:"class,omitempty"` Color string `json:"color,omitempty"` + Background string `json:"background,omitempty"` Border string `json:"border,omitempty"` BorderActive string `json:"border_active,omitempty"` Separator bool `json:"separator,omitempty"` @@ -383,6 +384,10 @@ func readConf() (MyConfig, error) { app.Color = Conf.Color } + if app.Background == "" { + app.Background = Conf.Background + } + if app.Border == "" { app.Border = Conf.Color } diff --git a/i3status-go-example.json b/i3status-go-example.json index 8220de3..8ac8970 100644 --- a/i3status-go-example.json +++ b/i3status-go-example.json @@ -1,6 +1,8 @@ { -// Default text and *block* background colors +// Default text and *block* border colors. If not set #3e78fd is used. "color" : "#3e78fd", + +// Default backbround color. If not set value of #edeceb is used. "background" : "#000000", // Load Average @@ -156,6 +158,8 @@ "class": "^Thunar$", // text color in html notation "color": "#ffa500", + // background color in html notation + "background" : "#000000", // border color in html notation "border": "#666666", // border color if there is at least one window with given Instance and/or Class exist diff --git a/main.go b/main.go index 3933e63..bf0b2d4 100644 --- a/main.go +++ b/main.go @@ -136,7 +136,7 @@ func main() { var b I3BarOutBlock b.FullText = app.FullText - b.Background = Conf.Background + b.Background = app.Background b.Color = app.Color b.Instance = app.Instance b.Markup = `pango`