mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-29 12:10:42 +00:00
Add bitcoin widget
This commit is contained in:
parent
742f8f6382
commit
ac3fd001aa
4 changed files with 66 additions and 34 deletions
7
home/.local/bin/scripts/bitcoin
Executable file
7
home/.local/bin/scripts/bitcoin
Executable 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"
|
Loading…
Add table
Add a link
Reference in a new issue