tmux-plugins / tmux-cpu

Plug and play cpu percentage and icon indicator for Tmux.
MIT License
444 stars 69 forks source link

not working? #53

Closed backpropper closed 4 years ago

backpropper commented 4 years ago

I am running macOS Catalina 10.15.5, iTerm2 3.3.11, tmux 3.1b. I also tested it on CentOS 7.7.1908 and found the same behavior. I am assuming it is not installed even though I followed the steps in README and didn't give any errors. I am using tpm. I added the specified string in README

set -g status-right '#{cpu_bg_color} CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M '

to my .tmux.conf. It still only shows the letters and seems to not parse the tags.

Screen Shot
backpropper commented 4 years ago

ok so the issue was that I wasn't adding the plugin lines at the end.

kaykhancheckpoint commented 2 years ago

@backpropper plugin lines at the end? what was the issue, im having the same problem as you

nkaretnikov commented 2 years ago

@kaykhancheckpoint this works for me

# Show cpu/mem usage info                                                          
set -g @cpu_low_icon "=" # icon when cpu is low                                    
set -g @cpu_medium_icon "≡" # icon when cpu is medium                              
set -g @cpu_high_icon "≣" # icon when cpu is high                                  

set -g @cpu_low_fg_color "#[fg=yellow]" # foreground color when cpu is low         
set -g @cpu_medium_fg_color "#[fg=yellow]" # foreground color when cpu is medium
set -g @cpu_high_fg_color "#[fg=yellow]" # foreground color when cpu is high       

set -g @cpu_low_bg_color "#[bg=green]" # background color when cpu is low          
set -g @cpu_medium_bg_color "#[bg=yellow]" # background color when cpu is medium
set -g @cpu_high_bg_color "#[bg=red]" # background color when cpu is high          

set -g @cpu_percentage_format "%3.1f%%" # printf format to use to display percentage

set -g @cpu_medium_thresh "30" # medium percentage threshold                     
set -g @cpu_high_thresh "80" # high percentage threshold                           

set -g @ram_(low_icon,high_bg_color,etc...) # same defaults as above             

set -g @cpu_temp_format "%2.0f" # printf format to use to display temperature   
set -g @cpu_temp_unit "C" # supports C & F                                         

set -g @cpu_temp_medium_thresh "80" # medium temperature threshold                 
set -g @cpu_temp_high_thresh "90" # high temperature threshold                     

set -g @cpu_temp_(low_icon,high_bg_color,etc...) # same defaults as above          

set -g status-right 'CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M '         
run-shell ~/tmux_plugins/tmux-cpu/cpu.tmux 

the order of lines is important here