tmuxline.vim icon indicating copy to clipboard operation
tmuxline.vim copied to clipboard

Color glitch when integrating with tmux-mem-cpu-load

Open mavam opened this issue 8 years ago • 0 comments

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:

glitch

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:

screen shot 2017-04-25 at 12 36 49 pm

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

mavam avatar Apr 25 '17 19:04 mavam