

#Weather indicator download code#
I fired up Visual Studio Code (amazing Golang support, really) and started writting what became my own simplistic (very) weather indicator. There was no available Go package for Weatherbit API so I quickly wrote one after testing a lot locally with curl and reading their documentation (not very feature rich, very simple and lacking some features that their API provided, which I might improve in the future).Īll I had to do now was to write the actual indicator. Looking at the provided icons, I decided to give it a try. I went back to search for another provider and came across Weatherbit which allows 75 free API requests per hour, more than enough for my needs. It worked well and all but honestly, I didn’t liked the icons on my dark tint2 bar for some reason. I started by forking go-wunderground which is a Go package to interact with the Weather Underground API and modifying it a little bit to include icon support, something that the original author didn’t included.

The plan was to find a weather provider with a free API and as a bonus, I wanted a provider which could also give me weather icons for each kind of scenario. The go-gtk package is really nice, even tough it is said to cover 47% of all what GTK has to offer, it is still amazing. So I came across go-gtk and felt compeled to write my own tiny indicator. Usually, the desktop environments I have used (Gnome, KDE, Mate) have some sort of applet for this included and I really never bothered (when I was using Openbox before, I had some hacky script that would display the weather in my tint2, but I can’t find it anymore). After I had everything working as I wanted to, I noticed the lack of a weather indicator in my systray. Recently I started using Openbox as my WM again (after a long time with KDE, the nostalgia hit me).
