greshake / i3status-rust

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

blocks/toggle: Allow customizing State when on/off #1974

Closed softmoth closed 6 months ago

softmoth commented 6 months ago

Fixes #1923.

softmoth commented 6 months ago

Is it preferable to use State::Info instead of ::Good? That allows for end-user customization but makes less of a statement by default.

MaxVerevkin commented 6 months ago

Maybe this can be a config option? Like state_on = "good" state_off = "idle" (State implements deserialize) (naming can be different). Also, should we try to preserve current behavior by default?

softmoth commented 6 months ago

Thanks for the hint on deserialize, I'll do that, and try keeping state_on = "idle" by default.