diff --git a/configs/i3.nix b/configs/i3.nix index 92358fc..3cc1606 100644 --- a/configs/i3.nix +++ b/configs/i3.nix @@ -90,6 +90,7 @@ in with config.niveum; { wifi-interface = networkInterfaces.wireless; batteryBlock = batteryBlocks.default; inherit (config.niveum) colours; + inherit pkgs; }) }"; }]; diff --git a/dot/i3status-rust.nix b/dot/i3status-rust.nix index 87eddc3..85faffa 100644 --- a/dot/i3status-rust.nix +++ b/dot/i3status-rust.nix @@ -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;