tmux: Check version for prefix active colorization
Prefix active colorization feature introduced by pull request #863 causes undesired behavior on older versions of tmux. Add version checking and revert to old powerline configuration if the tmux version is less than v1.8. tmux v1.8 was the first version to support the client_prefix format variable.
This commit is contained in:
parent
7937ab9866
commit
478e49773b
|
@ -7,7 +7,10 @@ set -g status-interval 2
|
|||
set -g status-fg colour231
|
||||
set -g status-bg colour234
|
||||
set -g status-left-length 20
|
||||
set -g status-left '#{?client_prefix,#[fg=colour254]#[bg=colour31]#[bold],#[fg=colour16]#[bg=colour254]#[bold]} #S #{?client_prefix,#[fg=colour31]#[bg=colour234]#[nobold],#[fg=colour254]#[bg=colour234]#[nobold]}#(eval $POWERLINE_COMMAND tmux left)'
|
||||
# Version check for 'client_prefix' format functionality
|
||||
if-shell '[ $TMUX_VERSION_MAJOR -gt 1 -o \( $TMUX_VERSION_MAJOR -eq 1 -a $TMUX_VERSION_MINOR -ge 8 \) ]' \
|
||||
"set -g status-left '#{?client_prefix,#[fg=colour254]#[bg=colour31]#[bold],#[fg=colour16]#[bg=colour254]#[bold]} #S #{?client_prefix,#[fg=colour31]#[bg=colour234]#[nobold],#[fg=colour254]#[bg=colour234]#[nobold]}#(eval $POWERLINE_COMMAND tmux left)'" \
|
||||
"set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold]#(eval $POWERLINE_COMMAND tmux left)'"
|
||||
set -g status-right '#(eval $POWERLINE_COMMAND tmux right -R pane_id=`tmux display -p "#D"`)'
|
||||
set -g status-right-length 150
|
||||
set -g window-status-format "#[fg=colour244,bg=colour234]#I #[fg=colour240] #[default]#W "
|
||||
|
|
Loading…
Reference in New Issue