Client: Add padding option in client to set space between tiled client (Feature #52 requested by Armael)
This commit is contained in:
parent
d3207be191
commit
995c4e94e7
11
src/client.c
11
src/client.c
@ -698,6 +698,17 @@ client_moveresize(Client *c, XRectangle geo, Bool r)
|
||||
client_geo_hints(&geo, c);
|
||||
|
||||
c->flags &= ~MaxFlag;
|
||||
|
||||
if(conf.client.padding && c->flags & TileFlag && c->flags & FLayFlag)
|
||||
{
|
||||
geo.x += conf.client.padding;
|
||||
geo.y += conf.client.padding;
|
||||
geo.width -= conf.client.padding;
|
||||
geo.height -= conf.client.padding;
|
||||
|
||||
c->flags &= ~FLayFlag;
|
||||
}
|
||||
|
||||
c->geo = c->ogeo = geo;
|
||||
|
||||
if(c->flags & FreeFlag || tags[c->screen][c->tag].layout.func == freelayout)
|
||||
|
||||
@ -263,6 +263,7 @@ conf_client_section(void)
|
||||
conf.client.resizecorner_focus = getcolor(fetch_opt_first(sec, "#DDDDDD", "resize_corner_focus").str);
|
||||
conf.client.mod |= char_to_modkey(fetch_opt_first(sec, "Alt", "modifier").str, key_list);
|
||||
conf.client.set_new_win_master = fetch_opt_first(sec, "true", "set_new_win_master").bool;
|
||||
conf.client.padding = fetch_opt_first(sec, "0", "padding").num;
|
||||
|
||||
mouse = fetch_section(sec, "mouse");
|
||||
|
||||
|
||||
@ -175,6 +175,9 @@ tiled_client(int screen, Client *c)
|
||||
|| c->screen != screen
|
||||
|| ishide(c, screen)); c = c->next);
|
||||
|
||||
if(c)
|
||||
c->flags |= FLayFlag;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
#define FSSFlag (1 << 8)
|
||||
#define AboveFlag (1 << 9)
|
||||
#define UrgentFlag (1 << 10)
|
||||
#define FLayFlag (1 << 11)
|
||||
|
||||
#define TagFlag(t) (1 << (t))
|
||||
|
||||
@ -400,6 +401,7 @@ typedef struct
|
||||
uint resizecorner_normal;
|
||||
uint resizecorner_focus;
|
||||
uint mod;
|
||||
uint padding;
|
||||
MouseBinding *mouse;
|
||||
int nmouse;
|
||||
} client;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user