greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.81k stars 472 forks source link

air pollution: new block idea #1590

Open martinpelikan opened 1 year ago

martinpelikan commented 1 year ago

I just finished setting up the weather block in my bar using OpenWeatherMap and found that they have a free API endpoint for air pollution: https://openweathermap.org/api/air-pollution

This could be a useful block for people living in certain regions. It would probably not fit in well with the existing weather block in case more backends are added and unifying them gets messy.

The AQI would be a good candidate for setting warning / critical colour formatting for the block. The alt formatting on click could expand to show the detailed numbers such as CO, NO, NO2, O3, etc.

I'm not familiar with Rust but if nobody wants to pick this up I'll give it a go using existing blocks as a reference.

MaxVerevkin commented 1 year ago

It would probably not fit in well with the existing weather block

Yeah, I agree. This new block can have options such as hide_good to hide if air pollution is low etc. which don't make sense for weather. And as you mentioned, this new block can make use of different coloring.

I'll give it a go using existing blocks as a reference

If you would like to get your hand on Rust, then go ahead! Feel free to ask any questions here.