power menu, redshift, polybar
This commit is contained in:
19
.config/polybar/scripts/ticker-forex/README.md
Normal file
19
.config/polybar/scripts/ticker-forex/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Script: ticker-forex
|
||||
|
||||
A small script that displays current exchange rates.
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
* `curl`
|
||||
* `jq`
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/ticker-forex]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/ticker-forex.sh
|
||||
interval = 600
|
||||
```
|
||||
12
.config/polybar/scripts/ticker-forex/ticker-forex.sh
Normal file
12
.config/polybar/scripts/ticker-forex/ticker-forex.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user