I3: Add padding to titlebar

Created on 25 Apr 2016  路  4Comments  路  Source: i3/i3

Idea is supporting padding into the title bar, that is for pango rendered text has some padding pixels around it. Pango has information how big is the space it occupies:

Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create(cr);
layout->set_text("hello world");
int stringWidth, stringHeight;
layout->get_pixel_size(stringWidth, stringHeight);

Proposed syntax would be similar to CSS, that is:
title_padding
title_padding
title_padding

4.12 enhancement

Most helpful comment

@Airblader Could this be in i3-gaps?

All 4 comments

Can't you just use this?

title_format "        %title"

I can use is as hacky way of achieving left padding, however it is not an option for vertical padding.

Also this is tangentaly related to #1750 since my original intentions were having text centered (not caring about marks that much).

For vertical padding I've tried another hack found here:

for_window [class=".*"] title_format "<span size="smaller">%title</span>"

though every time I put size=<something> whole title text disappears.

I think overall there doesn't seem to be a compelling reason for adding this that fits the philosophy of i3. I'm going to close this for now, but if someone has good reasons as for why we should add this I will consider reopening it.

@Airblader Could this be in i3-gaps?

Was this page helpful?
0 / 5 - 0 ratings