Add option to show/hide empty plugins
This commit is contained in:
parent
79521cc737
commit
143a0d8888
1 changed files with 11 additions and 2 deletions
|
@ -25,6 +25,7 @@ main()
|
||||||
show_day_month=$(get_tmux_option "@dracula-day-month" false)
|
show_day_month=$(get_tmux_option "@dracula-day-month" false)
|
||||||
show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
|
show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||||
IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather")
|
IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather")
|
||||||
|
show_empty_plugins=$(get_tmux_option "@dracula-show-empty-plugins" true)
|
||||||
|
|
||||||
# Dracula Color Pallette
|
# Dracula Color Pallette
|
||||||
white='#f8f8f2'
|
white='#f8f8f2'
|
||||||
|
@ -193,10 +194,18 @@ main()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $show_powerline; then
|
if $show_powerline; then
|
||||||
tmux set-option -ga status-right "#[fg=${!colors[0]},bg=${powerbg},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script "
|
if $show_empty_plugins; then
|
||||||
|
tmux set-option -ga status-right "#[fg=${!colors[0]},bg=${powerbg},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script "
|
||||||
|
else
|
||||||
|
tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[0]},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script }"
|
||||||
|
fi
|
||||||
powerbg=${!colors[0]}
|
powerbg=${!colors[0]}
|
||||||
else
|
else
|
||||||
tmux set-option -ga status-right "#[fg=${!colors[1]},bg=${!colors[0]}] $script "
|
if $show_empty_plugins; then
|
||||||
|
tmux set-option -ga status-right "#[fg=${!colors[1]},bg=${!colors[0]}] $script "
|
||||||
|
else
|
||||||
|
tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[1]},bg=${!colors[0]}] $script }"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue