From 550e8ce144e9b11a38431346f08de0891d4ef308 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Sat, 10 Apr 2021 00:38:43 -0300 Subject: [PATCH] checking if network_name exists and call network_bandwith script --- scripts/dracula.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index d52449f..89b1963 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -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