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

Support custom height for i3bar #3721

Open
Airblader opened this issue Jun 17, 2019 · 9 comments

Comments

Projects
None yet
4 participants
@Airblader
Copy link
Member

commented Jun 17, 2019

I'm submitting a…

[ ] Bug
[x] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Desired Behavior

The i3bar config should support a height configuration that specifies the height of i3bar. This should work exactly as in i3-gaps (in fact, ideally we'd just migrate the feature from there).

Edit: As discussed, let's instead make this a vertical_padding kind of option rather than an exact height.

Environment

Output of i3 --moreversion 2>&-:

i3 version: 4.16.1
@stapelberg

This comment has been minimized.

Copy link
Member

commented Jun 18, 2019

I’m not saying I’m against this, but can you explain a little more what the use case is? Currently, the height is derived from the font size. If the height is increased, does that influence the font size? If not, what is displayed in the extra space?

@Airblader

This comment has been minimized.

Copy link
Member Author

commented Jun 18, 2019

I think originally I added the height because of the custom border widths on status blocks (see other issue) to avoid overlapping the borders and the text. I've also seen people use it simply to make their bars taller or thinner according to preference. All content is simply vertically centered within the bar. It has no effect on font size (that would defeat the purpose, we might as well change the font size then).

A possible alternative approach to height would be a user-defined vertical padding of the bar, that might more accurately reflect its idea and somewhat reduce the dependency between font size and height.

@stapelberg

This comment has been minimized.

Copy link
Member

commented Jun 18, 2019

A possible alternative approach to height would be a user-defined vertical padding of the bar, that might more accurately reflect its idea and somewhat reduce the dependency between font size and height.

I think I’d prefer this approach over the height approach.

@Airblader

This comment has been minimized.

Copy link
Member Author

commented Jun 18, 2019

In general I am fine with changing some things as we migrate them to i3. My only concern is that I use the same version numbers in i3-gaps as i3 does, and changing this becomes somewhat of a breaking change. I guess, though, I can try to keep the height option in i3-gaps and convert it internally as padding := (height - font_size) / 2 (or similar).

Or swallow the breaking change pill and just print a warning when this option is used for a release…

@stapelberg

This comment has been minimized.

Copy link
Member

commented Jun 18, 2019

Attempting backwards compatibility as you outlined seems fine to me.

@Airblader Airblader referenced this issue Jun 18, 2019

Open

[Umbrella] Support gaps #3724

0 of 9 tasks complete
@Airblader

This comment has been minimized.

Copy link
Member Author

commented Jun 18, 2019

@stapelberg Another thought: ideally we could get package maintainers to merge i3-gaps packages into the i3 package, but in doing so if i3 has no height, it's a breaking change no matter what compat approach I take in i3-gaps for the time being. Hm…

@skontar

This comment has been minimized.

Copy link

commented Jun 18, 2019

Hi. This is my most favourite feature from gaps. It allows me to have reasonably big tray icons and workspace buttons with a smaller text and bit of padding everywhere.

I use something like:

    font pango: FontAwesome, Hack 11.5
    height 32

The result then is something like this:
Screenshot_2019-06-18_10-58-14

In normal i3 I could only get either:

    font pango: FontAwesome, Hack 11.5

Screenshot_2019-06-18_11-00-38

or

    font pango: FontAwesome, Hack 16

Screenshot_2019-06-18_11-00-54

Thanks for considering this feature!

@Airblader Airblader added the accepted label Jun 18, 2019

@stapelberg

This comment has been minimized.

Copy link
Member

commented Jun 18, 2019

@stapelberg Another thought: ideally we could get package maintainers to merge i3-gaps packages into the i3 package, but in doing so if i3 has no height, it's a breaking change no matter what compat approach I take in i3-gaps for the time being. Hm…

Sorry, maybe I wasn’t clear enough: I was saying that compatibility within i3 (not i3-gaps) is okay with me, specifically so that i3-gaps users can easily switch over.

@cdlscpmv

This comment has been minimized.

Copy link

commented Jun 26, 2019

I think the option name should be left as height, because it allows for more granullarity over the bar height. If I understand this right, the vertical_padding option will always add an en equal amount of pixels above and below the text, which will always add an even number of pixels to the bar height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.