This commit is contained in:
Dane Williams 2020-03-15 10:53:01 -07:00
parent 634f5c5eda
commit 5774f6e34b

View file

@ -7,7 +7,8 @@ main()
while tmux has-session &> /dev/null
do
./weather.sh > ~/.tmux/plugins/tmux-dracula/weather.txt
if [ (cat ~/.tmux/plugins/tmux-dracula/weather.txt | sed -n 2p) =~ ' "error": {' ]; then
error=$(cat ~/.tmux/plugins/tmux-dracula/weather.txt | sed -n 2p)
if [ $error = ' "error": {' ]; then
echo "Too Many Requests" > ~/.tmux/plugins/tmux-dracula/weather.txt
break
fi