mirror of
https://github.com/kmein/niveum
synced 2026-03-20 03:51:07 +01:00
feat(i3status-rust): corona block
This commit is contained in:
@@ -90,6 +90,7 @@ in with config.niveum; {
|
|||||||
wifi-interface = networkInterfaces.wireless;
|
wifi-interface = networkInterfaces.wireless;
|
||||||
batteryBlock = batteryBlocks.default;
|
batteryBlock = batteryBlocks.default;
|
||||||
inherit (config.niveum) colours;
|
inherit (config.niveum) colours;
|
||||||
|
inherit pkgs;
|
||||||
})
|
})
|
||||||
}";
|
}";
|
||||||
}];
|
}];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ wifi-interface, colours, batteryBlock }:
|
{ pkgs, wifi-interface, colours, batteryBlock }:
|
||||||
{
|
{
|
||||||
theme = {
|
theme = {
|
||||||
name = "plain";
|
name = "plain";
|
||||||
@@ -47,6 +47,17 @@
|
|||||||
max_width = 35;
|
max_width = 35;
|
||||||
on_collapsed_click = "spotify";
|
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";
|
block = "net";
|
||||||
device = wifi-interface;
|
device = wifi-interface;
|
||||||
|
|||||||
Reference in New Issue
Block a user