greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 475 forks source link

load block: not possible to customize range used for set state #509

Closed MiniGod closed 4 years ago

MiniGod commented 4 years ago

Would be nice to be able to customize the load block similarly to how the CPU block can be customized with info, warning and critical.

The load on my system is generally high, so the load block is constantly blue or yellow, with no way to change it.

Also, if load goes above 0.9 * logical_cores, state is set to Idle as it is the default. Load can go beyond 1 * logical_cores, so the logic should probably be changed to something similar to the CPU block.

https://github.com/greshake/i3status-rust/blob/840ceb23230ee22a42c14d3faeab67610b6aea46/src/blocks/load.rs#L112-L117

atheriel commented 4 years ago

Sure, this seems like a reasonable addition (and good eye on a potential bug). Feel free to submit a PR.