From f178daaffd7b77bbb9cf6fb52ef33177655a88ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sun, 2 May 2021 18:50:10 +0200 Subject: [PATCH] feat(i3status-rust): incidence --- lib/i3status-rust.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/i3status-rust.nix b/lib/i3status-rust.nix index 75e805a..0e56a5e 100644 --- a/lib/i3status-rust.nix +++ b/lib/i3status-rust.nix @@ -91,6 +91,18 @@ in { units = "metric"; }; } + { + block = "custom"; + interval = 60 * 60 * 12; + command = + let + area = "states"; # "districts"; + code = "BE"; # "11007"; + in pkgs.writers.writeDash "incidence" '' + printf "📈" + ${pkgs.curl}/bin/curl -sSL https://api.corona-zahlen.org/${area}/${code} | ${pkgs.jq}/bin/jq -r '.data.${code}.weekIncidence | round' + ''; + } { block = "custom"; interval = 30;