Merge pull request #175 from aaronkollasch/show-hide-empty-plugins
Add option to show/hide plugins with empty output
This commit is contained in:
commit
3a7ea6fc0b
1 changed files with 11 additions and 2 deletions
|
@ -27,6 +27,7 @@ main()
|
||||||
time_format=$(get_tmux_option "@dracula-time-format" "%Y-%m-%d(%a) %H:%M")
|
time_format=$(get_tmux_option "@dracula-time-format" "%Y-%m-%d(%a) %H:%M")
|
||||||
show_kubernetes_context_label=$(get_tmux_option "@dracula-kubernetes-context-label" "")
|
show_kubernetes_context_label=$(get_tmux_option "@dracula-kubernetes-context-label" "")
|
||||||
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'
|
||||||
|
@ -212,10 +213,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