mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-23 05:22:53 +00:00
Fix weather module
This commit is contained in:
parent
88628f81aa
commit
8c90b3439d
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/local/bin/bash
|
||||
|
||||
# Deps:
|
||||
# curl
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue