diff --git a/modules/weatherservices/weather/display.go b/modules/weatherservices/weather/display.go index 1ee2819e..3f118efd 100644 --- a/modules/weatherservices/weather/display.go +++ b/modules/weatherservices/weather/display.go @@ -81,5 +81,9 @@ func (widget *Widget) temperatures(cityData *owm.CurrentWeatherData) string { } func (widget *Widget) buildTitle(cityData *owm.CurrentWeatherData) string { - return fmt.Sprintf("%s %s", widget.emojiFor(cityData), cityData.Name) + if widget.settings.useEmoji { + return fmt.Sprintf("%s %s", widget.emojiFor(cityData), cityData.Name) + } + + return fmt.Sprintf("%s", cityData.Name) } diff --git a/modules/weatherservices/weather/settings.go b/modules/weatherservices/weather/settings.go index 6176bba3..816b0d45 100644 --- a/modules/weatherservices/weather/settings.go +++ b/modules/weatherservices/weather/settings.go @@ -24,6 +24,7 @@ type Settings struct { cityIDs []interface{} language string tempUnit string + useEmoji bool } func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings { @@ -34,6 +35,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co cityIDs: ymlConfig.UList("cityids"), language: ymlConfig.UString("language", "EN"), tempUnit: ymlConfig.UString("tempUnit", "C"), + useEmoji: ymlConfig.UBool("useEmoji", true), } settings.colors.current = ymlConfig.UString("colors.current", "green")