2020-03-15 04:13:46 +00:00
|
|
|
#/usr/bin/env bash
|
|
|
|
|
|
|
|
#wrapper script for running weather on interval
|
|
|
|
|
|
|
|
main()
|
|
|
|
{
|
2020-03-15 17:18:59 +00:00
|
|
|
while tmux has-session &> /dev/null
|
2020-03-15 04:13:46 +00:00
|
|
|
do
|
2020-03-15 05:30:21 +00:00
|
|
|
./weather.sh > ~/.tmux/plugins/tmux-dracula/weather.txt
|
2020-03-15 18:49:00 +00:00
|
|
|
# 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
|
2020-03-15 17:18:59 +00:00
|
|
|
sleep 1000
|
2020-03-15 04:13:46 +00:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
#run main driver function
|
|
|
|
main
|