diff --git a/awesomerc b/awesomerc index 5bf16e36..c3ec9a33 100644 --- a/awesomerc +++ b/awesomerc @@ -29,8 +29,6 @@ awesome: # ("(@)", "spiral"), ("[\]", "dwindle"), ("><>", "floating"), - ("TTT", "bstack"), - ("===", "bstackportrait") ); # Number of master windows (used by tile layouts) diff --git a/config.c b/config.c index eaeb8b17..e64ff20f 100644 --- a/config.c +++ b/config.c @@ -80,8 +80,6 @@ static const NameFuncLink LayoutsList[] = {"grid", grid}, {"spiral", spiral}, {"dwindle", dwindle}, - {"bstack", bstack}, - {"bstackportrait", bstackportrait}, {NULL, NULL} }; diff --git a/layouts/tile.c b/layouts/tile.c index a78ed963..e4734027 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -2,7 +2,6 @@ * tile.c - tile layout * * Copyright © 2007 Julien Danjou - * Copyright © 2007 Ross Mohn * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +34,7 @@ extern Client *sel, *clients; static double mwfact = 0.6; static int nmaster = 2; -static int ncols = 1; +static int ncols = 2; void uicb_setnmaster(Display *disp, @@ -43,7 +42,7 @@ uicb_setnmaster(Display *disp, awesome_config *awesomeconf, const char * arg) { - if(!IS_ARRANGE(tile) && !IS_ARRANGE(tileleft) && !IS_ARRANGE(bstack) && !IS_ARRANGE(bstackportrait)) + if(!IS_ARRANGE(tile) && !IS_ARRANGE(tileleft)) return; if(!arg) @@ -64,7 +63,7 @@ uicb_setmwfact(Display *disp, awesome_config * awesomeconf, const char *arg) { - if(!IS_ARRANGE(tile) && !IS_ARRANGE(tileleft) && !IS_ARRANGE(bstack) && !IS_ARRANGE(bstackportrait)) + if(!IS_ARRANGE(tile) && !IS_ARRANGE(tileleft)) return; if(!arg) @@ -198,74 +197,3 @@ tileleft(Display *disp, awesome_config *awesomeconf) { _tile(disp, awesomeconf, False); } - - -static void -_bstack(Display *disp, awesome_config *awesomeconf, Bool portrait) -{ - int i, n, nx, ny, nw, nh, mw, mh, tw, th; - int wah = get_windows_area_height(disp, awesomeconf->statusbar); - int waw = get_windows_area_width(disp, awesomeconf->statusbar); - Client *c; - - for(n = 0, c = clients; c; c = c->next) - if(IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags)) - n++; - - /* window geoms */ - mh = (n > nmaster) ? (wah * mwfact) / nmaster : wah / (n > 0 ? n : 1); - mw = waw; - th = (n > nmaster) ? (wah * (1 - mwfact)) / (portrait ? 1 : n - nmaster) : 0; - tw = (n > nmaster) ? waw / (portrait ? n - nmaster : 1) : 0; - - for(i = 0, c = clients; c; c = c->next) - { - if(!IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags)) - continue; - - c->ismax = False; - nx = get_windows_area_x(awesomeconf->statusbar); - ny = get_windows_area_y(awesomeconf->statusbar); - if(i < nmaster) - { - ny += i * mh; - nw = mw - 2 * c->border; - nh = mh - 2 * c->border; - } - else if(portrait) - { - nx += (i - nmaster) * tw; - ny += mh * nmaster; - nw = tw - 2 * c->border; - nh = th - 2 * c->border + 1; - } - else - { - ny += mh * nmaster; - nw = tw - 2 * c->border; - if(th > 2 * c->border) - { - ny += (i - nmaster) * th; - nh = th - 2 * c->border; - if (i == n - 1) - nh += (n > nmaster) ? wah - mh - th * (n - nmaster) : 0; - } - else - nh = wah - 2 * c->border; - } - resize(c, nx, ny, nw, nh, False); - i++; - } -} - -void -bstack(Display *disp, awesome_config *awesomeconf) -{ - _bstack(disp, awesomeconf, False); -} - -void -bstackportrait(Display *disp, awesome_config *awesomeconf) -{ - _bstack(disp, awesomeconf, True); -} diff --git a/layouts/tile.h b/layouts/tile.h index d87d8122..b9af4a29 100644 --- a/layouts/tile.h +++ b/layouts/tile.h @@ -29,7 +29,5 @@ void uicb_setnmaster(Display *, DC *, awesome_config *, const char *); /* void uicb_setmwfact(Display *, DC *, awesome_config *, const char *); /* sets master width factor */ void tile(Display *, awesome_config *); void tileleft(Display *, awesome_config *); -void bstack(Display *, awesome_config *); -void bstackportrait(Display *, awesome_config *); #endif