inital commit
This commit is contained in:
11
.local/bin/statusbar/corona
Executable file
11
.local/bin/statusbar/corona
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
( [ "$(stat -c %y ~/.cache/corona | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] || [ "$1" = "up" ] )&&
|
||||
curl -s https://corona-stats.online/Switzerland | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g" > ~/.cache/corona && notify-send "Corona" "Stats updated"; sleep 5; pkill -RTMIN+15 dwmblocks
|
||||
|
||||
increase=$( grep "Switzerland" ~/.cache/corona |
|
||||
sed "s/\s*//g; s/║//g; s/│/;/g" | awk -F';' '{print $4}' )
|
||||
[ "$increase" != "" ] && ( grep "Switzerland" ~/.cache/corona |
|
||||
sed "s/\s*//g; s/║//g; s/│/;/g" |
|
||||
awk -F';' '{print "😷"$3 " ("$4") 💀"$5 }' ) || ( grep "Switzerland" ~/.cache/corona |
|
||||
sed "s/\s*//g; s/║//g; s/│/;/g" |
|
||||
awk -F';' '{print "😷"$3 " 💀"$5 }' )
|
Reference in New Issue
Block a user