wait for $datafile if weather plugin is active
This commit is contained in:
parent
58619bd3c6
commit
9fcf4515b8
1 changed files with 6 additions and 6 deletions
|
@ -113,12 +113,6 @@ 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 $datafile exists just to avoid errors
|
|
||||||
# this should almost never need to wait unless something unexpected occurs
|
|
||||||
while $show_weather && [ ! -f $datafile ]; do
|
|
||||||
sleep 0.01
|
|
||||||
done
|
|
||||||
|
|
||||||
# Status left
|
# Status left
|
||||||
if $show_powerline; then
|
if $show_powerline; then
|
||||||
tmux set-option -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ${left_icon} #[fg=${green},bg=${gray}]#{?client_prefix,#[fg=${yellow}],}${left_sep}"
|
tmux set-option -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ${left_icon} #[fg=${green},bg=${gray}]#{?client_prefix,#[fg=${yellow}],}${left_sep}"
|
||||||
|
@ -164,6 +158,12 @@ main()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $plugin = "weather" ]; then
|
if [ $plugin = "weather" ]; then
|
||||||
|
# wait unit $datafile exists just to avoid errors
|
||||||
|
# this should almost never need to wait unless something unexpected occurs
|
||||||
|
while [ ! -f $datafile ]; do
|
||||||
|
sleep 0.01
|
||||||
|
done
|
||||||
|
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-weather-colors" "orange dark_gray")
|
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-weather-colors" "orange dark_gray")
|
||||||
script="#(cat $datafile)"
|
script="#(cat $datafile)"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue