From cb21271da572d6dda641015a4c3882228377e9b4 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Wed, 16 Oct 2019 19:42:00 -0300 Subject: [PATCH] waybar: weather widget fix --- waybar/.config/waybar/custom/weather | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/waybar/.config/waybar/custom/weather b/waybar/.config/waybar/custom/weather index f491201..240955d 100755 --- a/waybar/.config/waybar/custom/weather +++ b/waybar/.config/waybar/custom/weather @@ -1,9 +1,5 @@ #!/bin/sh -case $BLOCK_BUTTON in - 1)i3-msg 'termite -e curl wttr.in';; -esac - CITY=$(curl -s ipinfo.io/city) APPID="fd68c0fe7951f5ab7e24a240eb0942b8" @@ -12,6 +8,11 @@ OUTPUT=$(http get http://api.openweathermap.org/data/2.5/weather\?APPID\=${APPID # echo $APPID # echo $OUTPUT +if [ $? ] +then + exit 1 +fi + TEMP=$(echo $OUTPUT | jq -r ".main.temp") WEATHER=$(echo $OUTPUT | jq -r ".weather[0].main") case $WEATHER in