1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Sleep-based refresh timer for all widgets (don't judge me, it's temporary)

This commit is contained in:
Chris Cummer 2018-03-30 09:37:48 -07:00 committed by Chris Cummer
parent 69e0034871
commit 25898dcb24
2 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,8 @@ func icon(data *owm.CurrentWeatherData) string {
var icon string
switch data.Weather[0].Description {
case "broken clouds":
icon = "☁️"
case "clear":
icon = "☀️"
case "cloudy":

2
wtf.go
View File

@ -38,6 +38,8 @@ func main() {
go func() {
for {
time.Sleep(900 * time.Second) // 15 minutes
bamboo.Refresh()
cal.Refresh()
stat.Refresh()
weather.Refresh()
app.Draw()