aboutsummaryrefslogtreecommitdiff
path: root/scripts/weather
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-25 20:37:58 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-25 20:37:58 +0530
commit93657d7a40972e39ea8d059efad608a39b372985 (patch)
tree1e8ab02a6fd28866eb5c853fd8f9dc3bdde16b7f /scripts/weather
parent5fc3683942e82d52060ea8648e3c75137ba9ea71 (diff)
fixed temp. not showing for Sunny weather
Diffstat (limited to 'scripts/weather')
-rwxr-xr-xscripts/weather2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/weather b/scripts/weather
index 5aa47413..33208fc4 100755
--- a/scripts/weather
+++ b/scripts/weather
@@ -1,7 +1,7 @@
#!/bin/zsh
get_current_temp() {
- if [ $stat = "Smoke" ]; then
+ if [ $stat = "Smoke" ] || [ $stat = "Sunny" ]; then
temp=$(curl wttr.in | grep °C | awk 'NR==1 {print $4 "°C"}' | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g")
else
temp=$(curl wttr.in | grep °C | awk 'NR==1 {print $9 "°C"}' | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g")