aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBaitinq <30861839+Baitinq@users.noreply.github.com>2020-11-01 12:01:42 +0000
committerGitHub <noreply@github.com>2020-11-01 12:01:42 +0000
commitffcf64777fb606003e242d9407badf9f7db73a49 (patch)
treeab724b87474208d0e1a8c8efecdd41ba10ffb917 /modules
parent88628f81aad47015b0f7fe202adcc157ce268406 (diff)
parent00f5b44f5f54667f44e22ccf9893d1563c8cd827 (diff)
Merge pull request #20 from Baitinq/master
Fix weather module
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/weather4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/weather b/modules/weather
index 42887b7..9bd9f52 100755
--- a/modules/weather
+++ b/modules/weather
@@ -6,10 +6,10 @@
get_weather()
{
- curl -s v2.wttr.in | grep -e "Weather" | sed 's/C,.*/C/g; s/+//g; s/.*\[0m.//g; s/.//2'
+ 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
+if [ $(( 10#$(date '+%S') % 30 )) -eq 0 ]; then
get_weather
fi