Change weather_sleep to avoid writing to tracked files

Changed weather_sleep.sh and dracula.sh so that they do
not assume that weather.txt exist.  As a result I was
able to remove weather.txt as a tracked file.
This commit is contained in:
Ben Aaron Goldberg 2020-09-12 19:04:22 -04:00
parent c306b7782c
commit d9cc97a1d9
5 changed files with 10 additions and 1 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
data/weather.txt

0
data/.gitkeep Normal file
View file

View file

@ -1 +0,0 @@
Loading...

View file

@ -104,6 +104,11 @@ main()
# status bar
tmux set-option -g status-style "bg=${gray},fg=${white}"
# wait unit data/weather.txt exists just to avoid errors
# this should almost never need to wait unless something unexpected occurs
while [ ! -f $current_dir/../data/weather.txt ]; do
sleep 0.01
done
# Powerline Configuration
if $show_powerline; then

View file

@ -19,6 +19,10 @@ main()
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ ! -f $current_dir/../data/weather.txt ]; then
printf "Loading..." > $current_dir/../data/weather.txt
fi
$current_dir/weather.sh > $current_dir/../data/weather.txt
while tmux has-session &> /dev/null