Skip to content

Commit

Permalink
Merge pull request #107 from markcornick/datafile_correction
Browse files Browse the repository at this point in the history
Correct location of weather data file
  • Loading branch information
ethancedwards8 authored Jun 30, 2021
2 parents 8748783 + a84b579 commit dbdc65d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/dracula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ get_tmux_option() {

main()
{
datafile=/tmp/.dracula-tmux-data

# set current directory variable
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

Expand Down Expand Up @@ -130,9 +132,9 @@ main()
# status bar
tmux set-option -g status-style "bg=${gray},fg=${white}"

# wait unit data/weather.txt exists just to avoid errors
# wait unit $datafile exists just to avoid errors
# this should almost never need to wait unless something unexpected occurs
while $show_weather && [ ! -f $current_dir/../data/weather.txt ]; do
while $show_weather && [ ! -f $datafile ]; do
sleep 0.01
done

Expand Down Expand Up @@ -175,7 +177,7 @@ main()
fi

if $show_weather; then # weather
tmux set-option -ga status-right "#[fg=${orange},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${dark_gray},bg=${orange}] #(cat $current_dir/../data/weather.txt)"
tmux set-option -ga status-right "#[fg=${orange},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${dark_gray},bg=${orange}] #(cat $datafile)"
powerbg=${orange}
fi

Expand Down Expand Up @@ -224,7 +226,7 @@ main()
fi

if $show_weather; then # weather
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${orange}] #(cat $current_dir/../data/weather.txt) "
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${orange}] #(cat $datafile) "
fi

if $show_time; then
Expand Down

0 comments on commit dbdc65d

Please sign in to comment.