Start corona script

This commit is contained in:
flyingscorpio@arch-desktop 2020-05-05 15:29:25 +02:00
parent 9cca84d0fb
commit be09c30756
2 changed files with 21 additions and 0 deletions

View file

@ -58,6 +58,9 @@ interval=10
LABEL=<span foreground='#a1d569'>  </span>
DISK=/run/media/flyingscorpio/Backup
[corona]
interval=86400
[ccurrency]
command=scripts/ccurrency -f USD
interval=1800

18
dotfiles/i3/scripts/corona Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
[ "$(stat -c %y ~/.cache/corona 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] &&
curl -s 'https://corona-stats.online/France?source=1&minimal=true&emojis=true' > ~/.cache/corona
grep "France" ~/.cache/corona |
sed "s/\[31m//g" |
sed "s/\[32m//g" |
sed "s/\[33m//g" |
sed "s/\[39m//g" |
sed "s/\[90m//g" |
sed "s/\[91m//g" |
sed "s/\[94m//g" |
sed "s/\[97m//g" |
sed "s/\s*//g" |
sed "s/\^\[/;/g" |
awk -F';' '{print $1}'