23 lines
379 B
Bash
Executable File
23 lines
379 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CITY="auto"
|
|
|
|
COLOR1="#AAAAAA"
|
|
COLOR2="#444444"
|
|
|
|
|
|
if[$CITY = 'auto']
|
|
then
|
|
CITY="@$(curl zx2c4.com/ip | head -1)"
|
|
fi
|
|
|
|
icon=$(curl -s "wttr.in/$CITY?format=%C")
|
|
icon=$(echo $icon | tr -d ' ')
|
|
|
|
temp=$(curl -s "wttr.in/$CITY?format=%t")
|
|
|
|
wind=$(curl -s "wttr.in/$CITY?format=%w")
|
|
|
|
|
|
echo "^b$COLOR2^^c$COLOR1^ ^b$COLOR1^^c$COLOR2^ $icon ^c$COLOR1^^b$COLOR2^ $temp ^d^"
|