aboutsummaryrefslogblamecommitdiffstats
path: root/modules/weather
blob: 9bd9f52c406f56d29690eedf498e4bf172ffd487 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                                                                                 
#!/bin/bash

# Deps:
# 	curl


get_weather()
{
	curl -s v2.wttr.in | grep -e "Weather" | sed -n 2p | sed s/Weather://g | sed 's/,//g' | sed 's/+//g' | sed 's/°C.*/°C/' | sed 's/.*m//'
}


if [ $(( 10#$(date '+%S') % 30 )) -eq 0 ]; then
	get_weather
fi