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.

19 lines
450 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. if [ "$IDENTIFIER" = "unicode" ]; then
  10. printf "[%s]\n" "$(curl -s wttr.in/$LOCATION?format=1)"
  11. else
  12. printf "[WEA %s]\n" "$(curl -s wttr.in/$LOCATION?format=1 | grep -o "[0-9].*")"
  13. fi
  14. }
  15. dwm_weather