tmux-plugins / tmux-cpu

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

Add a '%' sign after cpu_percentage #75

Closed zbirenbaum closed 2 years ago

zbirenbaum commented 2 years ago

It is possible I am just lacking knowledge about string formatting, but set -g status-left '#{cpu_fg_color} CPU: #{cpu_percentage}' functions fine, as does set -g status-left '#{cpu_fg_color} CPU% #{cpu_percentage}' but: set -g status-left '#{cpu_fg_color} CPU: #{cpu_percentage} %' does not function at all. I just want a % sign after the numbers but can't seem to get it to format properly.

Also, set -g status-left '#{cpu_fg_color} CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M ' cuts off everything after the decimal place which is why I took out the string formatting options.

zbirenbaum commented 2 years ago

I have no idea why but changing it to be on the right instead of left and using set-option rather than set fixed it completely

casperdcl commented 2 years ago

Use %% instead of %

zbirenbaum commented 2 years ago

Use %% instead of %

I actually tried that shortly after posting but it didn't work unfortunately.