Code for window title border?

asked 2015-01-23 15:25:28 +0000

ANOKNUSA gravatar image

I'd like to change the thickness (height?) of the two horizontal borders in the titlebar from 1px to maybe 4px---an option not presently available via the config file. I've been looking through the i3 source and can't seem to find what sets the thickness of these lines. The closest (or at least most obvious) thing I've found relating to it is this snippet from <i3 source root>/src/x.c:

/* 5: draw two unconnected horizontal lines in border color */
xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[]) {p->color->border});
Rect *dr = &(con->deco_rect);
int deco_diff_l = 2;
int deco_diff_r = 2;
if (parent->layout == L_TABBED) {
    if (TAILQ_PREV(con, nodes_head, nodes) != NULL)
        deco_diff_l = 0;
    if (TAILQ_NEXT(con, nodes) != NULL)
        deco_diff_r = 0;
xcb_segment_t segments[] = {
    {dr->x, dr->y,
     dr->x + dr->width - 1, dr->y},
    {dr->x + deco_diff_l, dr->y + dr->height - 1,
     dr->x - deco_diff_r + dr->width - 1, dr->y + dr->height - 1}};
xcb_poly_segment(conn, parent->pixmap, parent->pm_gc, 2, segments);

I've fiddled with all the integers there, but they all seem to pertain to the padding of the lines within the titlebar. Again, just to clarify, I'm talking about the two lines in the titlebar affected by the border color setting in the config. Anyone have some pointers?

edit retag flag offensive close merge delete