-
Notifications
You must be signed in to change notification settings - Fork 778
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
i3bar: progressively shorten blocks when bar is too wide #4113
Comments
|
I think this would be a very nice addition. Maybe it should be optional to avoid unexpected behavior for users of very narrow (vertical) screens who might want all blocks to be in short mode. |
|
This seems like a strict upgrade that doesn't require any configuration so I don't see why not. |
|
This maybe could also be combined with a preference factor (of keeping full size) which can be given by the JSON api. Meaning that blocks with a lower preference value are tried to shorten before blocks with a higher preference value. To make the implementation easy, I would define that for each preference level used, it will be tried to gain enough place by only use Would this also be feasible for i3bar? I can implement the preference part, I think, but could not easily build an efficient algorithm trying to shorten the minimum needed blocks (either with or without a preference value). |
|
I would like to avoid expanding the protocol. |
I'm submitting a…
Current Behavior
When the predicted bar width is too wide, i3bar will switch every block over to its
short_textmode.Desired Behavior
When the predicted bar width is too wide, i3bar will progressively switch blocks over to
short_textmode until the width requirement is satisfied. The idea is to use short_text only for the minimum of needed blocks.Glancing over the code it seems doable, so I would be willing to give it a shot if this FR is accepted.
The text was updated successfully, but these errors were encountered: