summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorokan <okan>2020-04-16 13:32:35 +0000
committerokan <okan>2020-04-16 13:32:35 +0000
commit6407eb9bc1380d879f354c0331dbb5ea5302fe51 (patch)
tree7d49473b40db245157831e6b0a8df3fc995e3ded /client.c
parent6afdd483c774925dacc39dcc2b290d3bbfacdf21 (diff)
downloadcwm-6407eb9bc1380d879f354c0331dbb5ea5302fe51.tar.gz
cwm-6407eb9bc1380d879f354c0331dbb5ea5302fe51.tar.xz
cwm-6407eb9bc1380d879f354c0331dbb5ea5302fe51.zip
Allow configuring a percentage window size of the master window during
htile/vtile actions. From Uwe Werler, with a few manpage tweaks.
Diffstat (limited to 'client.c')
-rw-r--r--client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/client.c b/client.c
index 61b2cf4..cfdd048 100644
--- a/client.c
+++ b/client.c
@@ -940,7 +940,8 @@ client_htile(struct client_ctx *cc)
 	cc->geom.x = area.x;
 	cc->geom.y = area.y;
 	cc->geom.w = area.w - (cc->bwidth * 2);
-	cc->geom.h = (area.h - (cc->bwidth * 2)) / 2;
+	if (Conf.htile > 0)
+		cc->geom.h = ((area.h - (cc->bwidth * 2)) * Conf.htile) / 100;
 	client_resize(cc, 1);
 	client_ptr_warp(cc);
 
@@ -1007,7 +1008,8 @@ client_vtile(struct client_ctx *cc)
 	cc->flags &= ~CLIENT_VMAXIMIZED;
 	cc->geom.x = area.x;
 	cc->geom.y = area.y;
-	cc->geom.w = (area.w - (cc->bwidth * 2)) / 2;
+	if (Conf.vtile > 0)
+		cc->geom.w = ((area.w - (cc->bwidth * 2)) * Conf.vtile) / 100;
 	cc->geom.h = area.h - (cc->bwidth * 2);
 	client_resize(cc, 1);
 	client_ptr_warp(cc);