tmuxline.vim
tmuxline.vim copied to clipboard
Color glitch when integrating with tmux-mem-cpu-load
I'm using a powerline theme in combination with tmux-mem-cpu-load on the right side of my tmux status, but I'm observing an incorrect background color (not bg=default) for the divider:

My settings are:
let g:tmuxline_theme = 'lightline_insert'
let g:tmuxline_preset = {
\'a' : '#S',
\'b' : '#(whoami)',
\'c' : ['%Y-%m-%d', '%H:%M'],
\'win' : ['#I', '#W'],
\'cwin' : ['#I', '#W'],
\'x' : '#(tmux-mem-cpu-load -q -g 5 --interval 2)',
\'y' : '#h'}
The x component generates the following code:
#[bg=default] #[fg=colour108]#[fg=black,bg=colour108] 8839/16384MB #[fg=colour52]#[fg=brightwhite,bg=colour52] [ ] 4.4% #[fg=colour17]#[fg=brightwhite,bg=colour17] 1.77 1.41 1.34
Tmuxline generates the following:
set -g status-right "#[fg=colour238,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour248,bg=colour238] #(tmux-mem-cpu-load -q -g 5 --interval 2) #[fg=colour240,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour247,bg=colour240] #h "
I had to remove bg=colour238 to fix it:

Conclusion: it seems like we should not set bg for the powerline separator.