nordtheme/tmux

Support for tmux-battery and tmux-cpu

Laleee opened this issue · 3 comments

Hi,

I wanted to use tmux-battery and tmx-cpu plugins with this theme but icons seem to be behind status content. Can you add support for those?

Loved the theme!

nb5p commented

Yes, I have encountered the same problem. The status bar is overwritten after using the theme.

By default, this theme provides status bar content (including the powerline-styled background arrows).
The status content can be disabled by setting the @nord_tmux_show_status_content to 0:

set -g @nord_tmux_show_status_content "0"

This allows to define the status content on your own so you can add the variables for the specified plugins. The latest version 0.2.0 currently doesn't include the configuration, but you can use the develop branch until v0.3.0 is released which then includes #8.

For anyone looking, there is a way to modify what is already there. Note that this requires tmux-cpu to be installed.
This is what I was able to achive:
Screen Shot 2019-11-18 at 3 30 07 AM
and it does update with real time readings

Steps:

  1. make a backup of the existing config just in casecd ~/.tmux/plugins/nord-tmux/source/ && cp nord-status-content.conf nord-status-content.conf.bak *note that the path you have might be different

  2. replace the status-right formatting with:

set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] CPU: #{cpu_icon} #{cpu_percentage} #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H "

I decided to remove the date from the Nord bar and replace that, but it should be the same procedure to swap others too.

Anyway, that's just my 5-second hack for it. This is all untested, and will inevitably be lost during any updating so...