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
Feature request / Question: Threshold for making module invisible #934
Comments
Hmmm, I like this idea. Currently it's not possible but it could be done if we had a way to specify a 'this color should be hidden'. One option would be to create a special color for this purpose. I think specifying |
Out of curiosity, have you had a chance to look at this? I like the idea of adding some kind of COLOR_HIDDEN, sounds like the code change will not be big after all 🙂 |
I've been a bit busy so no not yet. I think the COLOR_HIDDEN may just be the easiest option. |
You could try multiple ifs.... This works for me. 😊 order += 'volume_status'
volume_status {
format = '[\?if=percentage>15 [\?if=percentage<90 '
format += '[\?if=is_input 😮|♪]: {percentage}%]]'
} |
@maximbaz You can try this. https://github.com/lasers/py3status/tree/fuckcolor. Don't try it with fuckmodule {
thresholds = [
(0, "fuckcolor"),
(5, "#FF0000"),
(10, "#E2571E"),
(20, "#FF7F00"),
(30, "#FFFF00"),
(40, "#00FF00"),
(50, "#96BF33"),
(60, "#0000FF"),
(70, "#4B0082"),
(80, "#8B00FF"),
(90, "#FFFFFF"),
]
} |
@maximbaz Have you tried this yet? I updated |
Just got to try it @lasers, works beautifully with After that is merged, if you have time and energy we can re-use this bug for follow-up PRs to also deprecate things like |
My issue is that this is related to I have other working branch too |
Thresholds aren't formatter though, right? So even if implementation might change, thresholds themselves and thus all functionality will remain. We've just talked with cyrinux and dreamed of all the possibilities that this "invisible" threshold brings, let's merge this 🙏 I'm not sure what shift+middleclick is, where was it mentioned? Ping me in that thread and I'll test and reply there, to keep things focused (I thought middle click by itself is supposed to be refresh, so what is shift+middleclick?). |
I don't know. Making blocks disappear is part of the formatter. Then again, colorizing the blocks is done in the formatter too. To be anal, using This just mark the block Will we still have blocks or something like that in new |
Good point about the naming, I'd rename (@ultrabug offtopic, I have a semi-urgent question waiting for you on IRC in a private message) |
Closed via #1726. |
Some modules have
thresholds
array, that allows changing colors based on some value.What I want is to have an additional threshold which I can use to hide the output entirely. I'll show you an example below, please tell me if this is already possible :)
I don't want to see the output of modules like
diskdata
ornet_rate
at all times. If I have enough free space on disk, I want to hide thediskdata
output from my bar. But if I begin lacking space, I want this to appear on my bar and I want the indicator to use yellow or red color based on my thresholds.Same goes for
net_rate
, now it hashide_if_zero
, but I want to hide it if it's less than a certain value.I would use it perhaps even for
volume_status
andbattery_level
, there's no need for me to be notified that I'm on my usual volume level and my battery is fully charged.Basically, it's a request to unify things like
hide_when_full
andhide_when_zero
with an extrathresholds
value, that will work everywhere and is a bit more adjustable./cc @tobes, @lasers
The text was updated successfully, but these errors were encountered: