Client: Add padding option in client to set space between tiled client (Feature #52 requested by Armael)
This commit is contained in:
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);
|
client_geo_hints(&geo, c);
|
||||||
|
|
||||||
c->flags &= ~MaxFlag;
|
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;
|
c->geo = c->ogeo = geo;
|
||||||
|
|
||||||
if(c->flags & FreeFlag || tags[c->screen][c->tag].layout.func == freelayout)
|
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.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.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.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");
|
mouse = fetch_section(sec, "mouse");
|
||||||
|
|
||||||
|
|||||||
@@ -175,6 +175,9 @@ tiled_client(int screen, Client *c)
|
|||||||
|| c->screen != screen
|
|| c->screen != screen
|
||||||
|| ishide(c, screen)); c = c->next);
|
|| ishide(c, screen)); c = c->next);
|
||||||
|
|
||||||
|
if(c)
|
||||||
|
c->flags |= FLayFlag;
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
#define FSSFlag (1 << 8)
|
#define FSSFlag (1 << 8)
|
||||||
#define AboveFlag (1 << 9)
|
#define AboveFlag (1 << 9)
|
||||||
#define UrgentFlag (1 << 10)
|
#define UrgentFlag (1 << 10)
|
||||||
|
#define FLayFlag (1 << 11)
|
||||||
|
|
||||||
#define TagFlag(t) (1 << (t))
|
#define TagFlag(t) (1 << (t))
|
||||||
|
|
||||||
@@ -400,6 +401,7 @@ typedef struct
|
|||||||
uint resizecorner_normal;
|
uint resizecorner_normal;
|
||||||
uint resizecorner_focus;
|
uint resizecorner_focus;
|
||||||
uint mod;
|
uint mod;
|
||||||
|
uint padding;
|
||||||
MouseBinding *mouse;
|
MouseBinding *mouse;
|
||||||
int nmouse;
|
int nmouse;
|
||||||
} client;
|
} client;
|
||||||
|
|||||||
@@ -124,6 +124,9 @@
|
|||||||
resize_corner_normal = "#191919"
|
resize_corner_normal = "#191919"
|
||||||
resize_corner_focus = "#003366"
|
resize_corner_focus = "#003366"
|
||||||
|
|
||||||
|
# Space between tiled clients
|
||||||
|
padding = 0
|
||||||
|
|
||||||
modifier = "Alt"
|
modifier = "Alt"
|
||||||
|
|
||||||
[mouse] button = "1" func = "client_raise" [/mouse]
|
[mouse] button = "1" func = "client_raise" [/mouse]
|
||||||
|
|||||||
Reference in New Issue
Block a user