tmux-plugin-sysstat icon indicating copy to clipboard operation
tmux-plugin-sysstat copied to clipboard

Add option to trim floating points from CPU percentage

Open h0adp0re opened this issue 4 years ago • 4 comments

I have a relatively simple request, I'd like an option to trim floating points from CPU percentage as they add no value to me and make the percentage harder to read at times.

h0adp0re avatar Sep 25 '20 11:09 h0adp0re

This would be great, as the CPU output would be similar to the MEM output which doesn't seem to have floating points.

tuv7041 avatar Oct 15 '20 12:10 tuv7041

Oh yeah, that's a good point. There are some inconsistencies:

  • The metric for used CPU percentage, #{cpu.pused}, has floating points.
  • The metric I'm using for RAM, #{mem.used}, has floating points, as it should, since it's in gigabytes.
  • The metric for used RAM percentage, #{mem.pused}, does not have floating points.

It'd be nice to have some consistency, in addition to visual grepability. Or maybe it would be easier to remove floating points entirely from metrics displayed as percentages?

h0adp0re avatar Oct 15 '20 22:10 h0adp0re

@h0adp0re @tuv7041

You may wanna take a look at https://github.com/samoshkin/tmux-plugin-sysstat/issues/8#issuecomment-1783944304.

Cheers

LFd3v avatar Oct 28 '23 23:10 LFd3v

Thanks for putting time into this! Alas, I've resorted to using https://github.com/tmux-plugins/tmux-cpu since. It has all I need and it's under the official organization, which is a small pseudo-guarantee.

h0adp0re avatar Oct 30 '23 22:10 h0adp0re