polybar: Add weather script

Added script to show the forecast weather for the immediate future /
right now in polybar.
This commit is contained in:
Marty Oehme 2020-09-07 22:01:30 +02:00
parent 18cd15222d
commit 5d265a33f7
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A
2 changed files with 35 additions and 1 deletions

View file

@ -0,0 +1,23 @@
#!/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