Add bitcoin widget

This commit is contained in:
ItsDrike 2021-08-24 17:25:09 +02:00
parent 742f8f6382
commit ac3fd001aa
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD
4 changed files with 66 additions and 34 deletions

View file

@ -0,0 +1,7 @@
#!/bin/sh
BTC_DATA=$(curl https://api.coindesk.com/v1/bpi/currentprice.json 2>/dev/null)
BTC_PRICE=$(echo $BTC_DATA | jq -r ".bpi.USD.rate_float")
BTC_PRICE=$(printf "%.2f" "$BTC_PRICE")
echo \$"$BTC_PRICE"