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

filesystem: warn mode below threshold #1871

Closed
petrmanek opened this issue Sep 14, 2019 · 2 comments
Closed

filesystem: warn mode below threshold #1871

petrmanek opened this issue Sep 14, 2019 · 2 comments
Labels

Comments

@petrmanek
Copy link

Is your feature request related to a problem? Please describe.

Nope. Just switched to polybar and miss this particular feature.

Why does polybar need this feature?

Currently, filesystem modules have only 2 modes: mounted or unmounted. This is useful in some cases (e.g. network or USB storage mounts), but doesn't capture a more frequent issue when a mount runs out of free space. Other bars support some variants of conditioned appearance in such cases. It would be cool if Polybar caught up.

Describe the solution you'd like

I propose to replicate the scheme used in the temperature module:

  1. add a new warn mode to allow appearance customization when the free space is low,
  2. add a new warn-space attribute to control when the warn mode is activated; its value could either be a 0-1 float (percentage of the total capacity) or a value in bytes, if the value is negative (which could be the default for compatibility reasons), the warn mode would be permanently disabled

Describe alternatives you've considered

The same can be done with a custom shell script, but that in my opinion introduces too much overhead. It would be nice to have the same thing along with the low memory footprint of Polybar.

Additional context

N/A

@patrick96
Copy link
Member

We will consider this when we rework the module state machines.

@patrick96
Copy link
Member

This has now been implemented in #2199

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

No branches or pull requests

2 participants