Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Set border size values using percentages #1567

Description

@douglasrizzo

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

I am trying to set border size values using percentages. I use the same config file for multiple monitors, but since they have different resolutions, setting the border in pixels is not very useful.

Why does polybar need this feature?

Dimensions and offset can already be set using percentages, but the border cannot. This feature will be useful in the same way the aforementioned ones are, making configuration more flexible and specially useful for users with multiple monitors with different dimensions.

Describe the solution you'd like

To be able to set the values of border-{left|right|top|bottom}-size using percentages, for example:

border-left-size = 12%
border-right-size = 12%
border-top-size = 1
border-bottom}-size = 1

Percentages can be relative to the current dimensions of the bar or the display size.

Describe alternatives you've considered

I tried using the percentages, but currently they are treated as pixel values, e.g. border-left-size = 30% has the same behavior as border-left-size = 30.

Additional context

I have a display which is 1920 pixels wide and another one which is 1440 pixels wide. In the larger one, I set border-left-size and border-right-size to 300, but in the smaller one, these borders are too large. Using percentages instead of pixel values might help mitigate this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions