Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to trim floating points from CPU percentage #22

Open
h0adp0re opened this issue Sep 25, 2020 · 4 comments
Open

Add option to trim floating points from CPU percentage #22

h0adp0re opened this issue Sep 25, 2020 · 4 comments

Comments

@h0adp0re
Copy link

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.

@tuv7041
Copy link

tuv7041 commented Oct 15, 2020

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

@h0adp0re
Copy link
Author

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?

@LFd3v
Copy link

LFd3v commented Oct 28, 2023

@h0adp0re @tuv7041

You may wanna take a look at #8 (comment).

Cheers

@h0adp0re
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants