dotfiles/polybar/scripte/nightscout_cgm.sh
2021-06-29 17:02:49 +02:00

7 lines
319 B
Bash
Executable file

#!/bin/bash
curl -s -X GET "https://nightscout.mgrote.net/api/v1/entries/sgv?count=1&token=polybar-ae6fe2720f2c30f4" > /dev/null
if [ $? -ne 0 ]; then
echo "---"
else
curl -s -X GET "https://nightscout.mgrote.net/api/v1/entries/sgv?count=1&token=polybar-ae6fe2720f2c30f4" | awk '{printf "%.1f\n",$3*0.0555}'
fi