diff --git a/dracula.tmux b/dracula.tmux index 5abe525..8f3a4be 100755 --- a/dracula.tmux +++ b/dracula.tmux @@ -39,7 +39,6 @@ main() # run scripts in background ./sleep_weather.sh & - #./internet.sh > internet.txt & # status bar tmux set-option -g status-style "bg=${gray},fg=${white}" diff --git a/sleep_weather.sh b/sleep_weather.sh index 71e0174..ba7ae76 100755 --- a/sleep_weather.sh +++ b/sleep_weather.sh @@ -4,10 +4,11 @@ main() { + echo "Loading Weather..." > ~/.tmux/plugins/tmux-dracula/weather.txt while tmux has-session &> /dev/null do ./weather.sh > ~/.tmux/plugins/tmux-dracula/weather.txt - if [ (cat ~/.tmux/plugins/tmux-dracula/weather.txt | tail -1) = } ]; then + if [ (cat ~/.tmux/plugins/tmux-dracula/weather.txt | sed -n 2p) =~ ' "error": {' ]; then echo "Too Many Requests" > ~/.tmux/plugins/tmux-dracula/weather.txt break fi