From some time, I wanted to create my own app, which will display some data in top panel in macOS or Gnome environment on Linux. I collected some resources about that and I knew that for macOS I need to write an app in Obj-C and for Gnome I need to write a plugin in JavaScript. In both cases it requires some ceremony and preparation. Recently I’ve found a great app for macOS called BitBar (by the way it’s open-source). BitBar allows to put anything to macOS menu bar (top panel) in no time! With this project creating top panel apps is simplified to the limit. Moreover, there’s another project called Argos, which does the same thing, but for Linux with Gnome (it’s an open-source Gnome Extension). In both cases, we just need to create a shell script, put it into appropriate directory (in case of Argos, it’s ~/.config/argos/ and in case of BitBar, we define it during the installation or first run) and then app displays our data automatically. We can also set refresh rate. E.g. if we want our script to be executed every 60 seconds, we can name it script.60s.sh. We can also create more advanced scripts and more details can be found in BitBar and Argos documentation. In my case, I wanted to create a script, which reads CAQI (Common Air Quality Index) in my current location based on Airly sensors. Airly provides nice API, which we can use in our projects. Please remember that most of the sensors are located in Poland. On my Ubuntu Linux with Gnome 3, I created a new script in the following path:
...