1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

feat(i3status-rust): corona block

This commit is contained in:
Kierán Meinhardt
2020-04-15 00:08:44 +02:00
parent ade69c281b
commit 4b5f5442f7
2 changed files with 13 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
{ wifi-interface, colours, batteryBlock }:
{ pkgs, wifi-interface, colours, batteryBlock }:
{
theme = {
name = "plain";
@@ -47,6 +47,17 @@
max_width = 35;
on_collapsed_click = "spotify";
}
{
block = "custom";
interval = 60 * 60 * 60; # hourly
command = pkgs.writers.writeDash "corona" ''
${pkgs.curl}/bin/curl https://corona-stats.online/germany \
| ${pkgs.gnugrep}/bin/grep Germany \
| ${pkgs.gnused}/bin/sed 's/\s*//g' \
| ${pkgs.ansifilter}/bin/ansifilter \
| ${pkgs.gawk}/bin/awk -F'' '{print "CORONA " $3 " (" $4 ") " $5 " (" $6 ")"}'
'';
}
{
block = "net";
device = wifi-interface;