From 6a1277726ae5cc51ca3baf3cc38b0bf33d87b956 Mon Sep 17 00:00:00 2001 From: Dane Williams Date: Sun, 15 Mar 2020 10:32:59 -0700 Subject: [PATCH] should work now --- dracula.tmux | 1 - sleep_weather.sh | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) 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