You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/sh
|
|
|
|
# A dwm_bar function to print the weather from wttr.in
|
|
# Joe Standring <git@joestandring.com>
|
|
# GNU GPLv3
|
|
|
|
# Dependencies: curl
|
|
|
|
# Change the value of LOCATION to match your city
|
|
dwm_weather() {
|
|
LOCATION=city
|
|
|
|
printf "%s" "$SEP1"
|
|
if [ "$IDENTIFIER" = "unicode" ]; then
|
|
printf "%s" "$(curl -s wttr.in/$LOCATION?format=1)"
|
|
else
|
|
printf "WEA %s" "$(curl -s wttr.in/$LOCATION?format=1 | grep -o "[0-9].*")"
|
|
fi
|
|
printf "%s\n" "$SEP2"
|
|
}
|
|
|
|
dwm_weather
|