1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-30 03:51:28 +00:00
Dotfiles/.config/polybar/polybar-scripts/ticker-forex/ticker-forex.sh

13 lines
258 B
Bash
Raw Normal View History

2020-07-27 04:59:00 +00:00
#!/bin/sh
API="https://api.exchangeratesapi.io/latest"
CURRENCY_BASE="EUR"
CURRENCY_QUOTE="PLN"
quote=$(curl -sf "$API?base=$CURRENCY_BASE&symbols=$CURRENCY_QUOTE" | jq -r ".rates.$CURRENCY_QUOTE")
quote=$(LANG=C printf "%.2f" "$quote")
echo "# $quote"