Configuration file for dwm-bar on macbook air
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.

22 lines
493 B

  1. #!/bin/sh
  2. # A dwm_bar function to print the weather from wttr.in
  3. # Joe Standring <git@joestandring.com>
  4. # GNU GPLv3
  5. # Dependencies: curl
  6. # Change the value of LOCATION to match your city
  7. dwm_weather() {
  8. LOCATION=city
  9. printf "%s" "$SEP1"
  10. if [ "$IDENTIFIER" = "unicode" ]; then
  11. printf "%s" "$(curl -s wttr.in/$LOCATION?format=1)"
  12. else
  13. printf "WEA %s" "$(curl -s wttr.in/$LOCATION?format=1 | grep -o "[0-9].*")"
  14. fi
  15. printf "%s\n" "$SEP2"
  16. }
  17. dwm_weather