dotfiles/polybar/.config/polybar/scripts/poly-weather

24 lines
714 B
Bash
Executable File

#!/usr/bin/env sh
wttr() {
# change Paris to your default location
request="wttr.in/${1-~Leipzig}"
curl -s -H "Accept-Language: ${LANG%_*}" --compressed "${request}"
}
wttr "$@"
# while true; do
# all="$(bib-due -u 'fri this week' -p3 | wc -l)"
# required="$(bib-due -u 'fri this week' -p1 | wc -l)"
# # add polybar formatting to color required readings red
# # https://github.com/polybar/polybar/wiki/Formatting#format-tags
# # TODO use xresources
# colorreq=$(xrdb -query | grep -e '\*color1:' | cut -f2)
# colorall=$(xrdb -query | grep -e '\*foreground:' | cut -f2)
# printf "%s%s%s(%s)\n" "%{F${colorall:-#000}}" "$all" "%{F${colorreq:-#d00}}" "$required"
# sleep 120
# done