This commit is contained in:
Dane Williams 2020-03-15 10:53:01 -07:00
parent 634f5c5eda
commit 5774f6e34b
1 changed files with 2 additions and 1 deletions

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