1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-08 01:43:13 +00:00
Dotfiles/.config/polybar/polybar-scripts/ticker-forex/ticker-forex.sh
2020-07-27 07:59:00 +03:00

13 lines
258 B
Bash

#!/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"