Merge branch 'master' into add-custom-script-plugin
This commit is contained in:
commit
854ea972fa
3 changed files with 33 additions and 63 deletions
|
@ -7,8 +7,6 @@ source $current_dir/utils.sh
|
|||
|
||||
main()
|
||||
{
|
||||
datafile=/tmp/.dracula-tmux-data
|
||||
|
||||
# set configuration option variables
|
||||
show_fahrenheit=$(get_tmux_option "@dracula-show-fahrenheit" true)
|
||||
show_location=$(get_tmux_option "@dracula-show-location" true)
|
||||
|
@ -24,7 +22,7 @@ main()
|
|||
show_border_contrast=$(get_tmux_option "@dracula-border-contrast" false)
|
||||
show_day_month=$(get_tmux_option "@dracula-day-month" false)
|
||||
show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
time_format=$(get_tmux_option "@dracula-time-format" "%Y-%m-%d(%a) %H:%M")
|
||||
time_format=$(get_tmux_option "@dracula-time-format" "")
|
||||
show_kubernetes_context_label=$(get_tmux_option "@dracula-kubernetes-context-label" "")
|
||||
IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather")
|
||||
show_empty_plugins=$(get_tmux_option "@dracula-show-empty-plugins" true)
|
||||
|
@ -67,11 +65,6 @@ main()
|
|||
left_sep="$show_left_sep"
|
||||
fi
|
||||
|
||||
# start weather script in background
|
||||
if [[ "${plugins[@]}" =~ "weather" ]]; then
|
||||
$current_dir/sleep_weather.sh $show_fahrenheit $show_location $fixed_location &
|
||||
fi
|
||||
|
||||
# Set timezone unless hidden by configuration
|
||||
case $show_timezone in
|
||||
false)
|
||||
|
@ -197,14 +190,8 @@ main()
|
|||
script="#($current_dir/kubernetes_context.sh $show_kubernetes_context_label)"
|
||||
|
||||
elif [ $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")
|
||||
script="#(cat $datafile)"
|
||||
script="#($current_dir/weather_wrapper.sh $show_fahrenheit $show_location $fixed_location)"
|
||||
|
||||
elif [ $plugin = "time" ]; then
|
||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-time-colors" "dark_purple white")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue