polybar: nightscout
This commit is contained in:
parent
8221762605
commit
adacb2560d
1 changed files with 30 additions and 30 deletions
|
@ -4,34 +4,34 @@ api_url=$(curl -s -X GET "https://nightscout.mgrote.net/api/v1/entries/sgv?count
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "---"
|
echo "---"
|
||||||
else
|
else
|
||||||
symbol=$(echo $api_url | awk '{print $4}')
|
symbol=$(echo $api_url | awk '{print $4}')
|
||||||
#echo $symbol
|
#echo $symbol
|
||||||
wert=$(echo $api_url | awk '{printf "%.1f\n",$3*0.0555}')
|
wert=$(echo $api_url | awk '{printf "%.1f\n",$3*0.0555}')
|
||||||
#echo $wert
|
#echo $wert
|
||||||
case $symbol in
|
case $symbol in
|
||||||
'"SingleDown"')
|
'"SingleDown"')
|
||||||
echo $wert "-"
|
echo $wert "↓"
|
||||||
;;
|
;;
|
||||||
'"SingleUp"')
|
'"SingleUp"')
|
||||||
echo $wert "+"
|
echo $wert "↑"
|
||||||
;;
|
;;
|
||||||
'"DoubleDown"')
|
'"DoubleDown"')
|
||||||
echo $wert "--"
|
echo $wert "⇊"
|
||||||
;;
|
;;
|
||||||
'"DoubleUp"')
|
'"DoubleUp"')
|
||||||
echo $wert "++"
|
echo $wert "⇈"
|
||||||
;;
|
;;
|
||||||
'"FortyFiveDown"')
|
'"FortyFiveDown"')
|
||||||
echo $wert "\"
|
echo $wert "⇘"
|
||||||
;;
|
;;
|
||||||
'"FortyFiveUp"')
|
'"FortyFiveUp"')
|
||||||
echo $wert "/"
|
echo $wert "⇗"
|
||||||
;;
|
;;
|
||||||
'"Flat"')
|
'"Flat"')
|
||||||
echo $wert "="
|
echo $wert "→"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $symbol
|
echo $symbol
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue