Fix spacing between status elements

Only the most right status element seemed to be padded with a space, for
the non-powerline configuration. The powerline configuration seems to
embed padding by the seperator, and thus requires a pad on the last
element.

This commit moves the padding next to the seperator to the script
output instead.

Remove trailing newline

Uniformalizes to the other scripts.
This commit is contained in:
August Feng 2021-07-24 11:03:21 -04:00 committed by August Feng
parent 9705766ba2
commit f863305ef8

View file

@ -187,15 +187,13 @@ main()
fi
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"
tmux set-option -ga status-right "#[fg=${!colors[0]},bg=${powerbg},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script "
powerbg=${!colors[0]}
else
tmux set-option -ga status-right "#[fg=${!colors[1]},bg=${!colors[0]}] $script"
tmux set-option -ga status-right "#[fg=${!colors[1]},bg=${!colors[0]}] $script "
fi
done
tmux set-option -ga status-right " "
# Window option
if $show_powerline; then
tmux set-window-option -g window-status-current-format "#[fg=${gray},bg=${dark_purple}]${left_sep}#[fg=${white},bg=${dark_purple}] #I #W${current_flags} #[fg=${dark_purple},bg=${gray}]${left_sep}"
@ -210,4 +208,3 @@ main()
# run main function
main