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
|
||||
echo "---"
|
||||
else
|
||||
symbol=$(echo $api_url | awk '{print $4}')
|
||||
#echo $symbol
|
||||
wert=$(echo $api_url | awk '{printf "%.1f\n",$3*0.0555}')
|
||||
#echo $wert
|
||||
case $symbol in
|
||||
'"SingleDown"')
|
||||
echo $wert "-"
|
||||
;;
|
||||
'"SingleUp"')
|
||||
echo $wert "+"
|
||||
;;
|
||||
'"DoubleDown"')
|
||||
echo $wert "--"
|
||||
;;
|
||||
'"DoubleUp"')
|
||||
echo $wert "++"
|
||||
;;
|
||||
'"FortyFiveDown"')
|
||||
echo $wert "\"
|
||||
;;
|
||||
'"FortyFiveUp"')
|
||||
echo $wert "/"
|
||||
;;
|
||||
'"Flat"')
|
||||
echo $wert "="
|
||||
;;
|
||||
*)
|
||||
echo $symbol
|
||||
;;
|
||||
esac
|
||||
symbol=$(echo $api_url | awk '{print $4}')
|
||||
#echo $symbol
|
||||
wert=$(echo $api_url | awk '{printf "%.1f\n",$3*0.0555}')
|
||||
#echo $wert
|
||||
case $symbol in
|
||||
'"SingleDown"')
|
||||
echo $wert "↓"
|
||||
;;
|
||||
'"SingleUp"')
|
||||
echo $wert "↑"
|
||||
;;
|
||||
'"DoubleDown"')
|
||||
echo $wert "⇊"
|
||||
;;
|
||||
'"DoubleUp"')
|
||||
echo $wert "⇈"
|
||||
;;
|
||||
'"FortyFiveDown"')
|
||||
echo $wert "⇘"
|
||||
;;
|
||||
'"FortyFiveUp"')
|
||||
echo $wert "⇗"
|
||||
;;
|
||||
'"Flat"')
|
||||
echo $wert "→"
|
||||
;;
|
||||
*)
|
||||
echo $symbol
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue