checking if network_name exists and call network_bandwith script

This commit is contained in:
Rodrigo Nascimento 2021-04-10 00:38:43 -03:00
parent 6ac5897ac1
commit 550e8ce144

View file

@ -39,6 +39,7 @@ main()
show_day_month=$(get_tmux_option "@dracula-day-month" false)
show_time=$(get_tmux_option "@dracula-show-time" true)
show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
show_network_bandwith=$(get_tmux_option "@dracula-network-bandwith" "")
# Dracula Color Pallette
white='#f8f8f2'
@ -167,6 +168,11 @@ main()
powerbg=${cyan}
fi
if [[ "$show_network_bandwith" != "" ]]; then # network bandwith
tmux set-option -ga status-right "#[fg=${green},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${dark_gray},bg=${green}] #($current_dir/network_bandwith.sh)"
powerbg=${green}
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)"
powerbg=${orange}
@ -211,6 +217,10 @@ main()
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${cyan}] #($current_dir/network.sh) "
fi
if [[ "$show_network_bandwith" != "" ]]; then # network bandwith
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${green}] #($current_dir/network_bandwith.sh) "
fi
if $show_weather; then # weather
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${orange}] #(cat $current_dir/../data/weather.txt) "
fi