-
Notifications
You must be signed in to change notification settings - Fork 475
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
maildir block: add configuration "hide_if_total_is_zero" #2113
Comments
You can achieve this by using [[block]]
block = "maildir"
format = " $icon $status.eng(range:1..) |" This may be added to the examples. |
This is a solid workaround, but it does not work without $status. I would like to avoid seeing the status count on the display. |
Not yet. I imagine adding an argument to not render a value, something like I would prefer it over "hide if zero" because it would solve this issue for all blocks at once. |
I am very happy with this solution. It's consistent (.eng is being used I assume .eng(render:false) will print "" rather than " ". If so, zero |
Fixes #2113 Example usage (will show the icon but only if $status >= 1): ```toml [[block]] block = "maildir" format = " $icon $status.eng(range:1..,show:false)|" ```
It would be both consistent1 and useful for maildir notifications to only appear when mail is present. I have not seen the source, but it should successfully return nothing if
status = 0
andhide_if_total_is_zero = true
.1 The github block has an identical configuration.
The text was updated successfully, but these errors were encountered: