aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/i3status-rust/grandmaster4000.toml5
-rw-r--r--.config/i3status-rust/speedwagon.toml5
-rwxr-xr-x.local/bin/air_quality_poznan.sh6
3 files changed, 16 insertions, 0 deletions
diff --git a/.config/i3status-rust/grandmaster4000.toml b/.config/i3status-rust/grandmaster4000.toml
index a45f7ab..c583e64 100644
--- a/.config/i3status-rust/grandmaster4000.toml
+++ b/.config/i3status-rust/grandmaster4000.toml
@@ -19,6 +19,11 @@ info_bg = "#7aa2f7"
icons = "awesome4"
[[block]]
+block = "custom"
+command = "echo  $(~/.local/bin/air_quality_poznan.sh)"
+interval = 600
+
+[[block]]
block = "weather"
format = "$icon $weather $temp"
service = { name = "openweathermap", api_key = "70dbf8d9e3e8874f931cec5b17dc165c", city_id = "3088171", units = "metric" }
diff --git a/.config/i3status-rust/speedwagon.toml b/.config/i3status-rust/speedwagon.toml
index 1a244ef..24fc96d 100644
--- a/.config/i3status-rust/speedwagon.toml
+++ b/.config/i3status-rust/speedwagon.toml
@@ -19,6 +19,11 @@ info_bg = "#7aa2f7"
icons = "awesome4"
[[block]]
+block = "custom"
+command = "echo  $(~/.local/bin/air_quality_poznan.sh)"
+interval = 600
+
+[[block]]
block = "weather"
format = "$icon $weather $temp"
service = { name = "openweathermap", api_key = "70dbf8d9e3e8874f931cec5b17dc165c", city_id = "3088171", units = "metric" }
diff --git a/.local/bin/air_quality_poznan.sh b/.local/bin/air_quality_poznan.sh
new file mode 100755
index 0000000..7bba79d
--- /dev/null
+++ b/.local/bin/air_quality_poznan.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+ADP_URL="https://www.poznan.pl/mim/wos/atmosfera.html"
+PM10_CSS_CLASS=".pm_text"
+
+curl -sSL "${ADP_URL}" | hq "${PM10_CSS_CLASS}" text | cut -d ':' -f 2