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:
parent
c306b7782c
commit
d9cc97a1d9
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
data/weather.txt
|
0
data/.gitkeep
Normal file
0
data/.gitkeep
Normal file
|
@ -1 +0,0 @@
|
||||||
Loading...
|
|
|
@ -104,6 +104,11 @@ main()
|
||||||
# status bar
|
# status bar
|
||||||
tmux set-option -g status-style "bg=${gray},fg=${white}"
|
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
|
# Powerline Configuration
|
||||||
if $show_powerline; then
|
if $show_powerline; then
|
||||||
|
|
|
@ -19,6 +19,10 @@ main()
|
||||||
|
|
||||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
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
|
$current_dir/weather.sh > $current_dir/../data/weather.txt
|
||||||
|
|
||||||
while tmux has-session &> /dev/null
|
while tmux has-session &> /dev/null
|
||||||
|
|
Loading…
Reference in a new issue