remove bstack layout

This commit is contained in:
Julien Danjou 2007-09-15 12:37:34 +02:00
parent 3a61701885
commit ceb7e60ee0
4 changed files with 3 additions and 81 deletions

View File

@ -29,8 +29,6 @@ awesome:
# ("(@)", "spiral"),
("[\]", "dwindle"),
("><>", "floating"),
("TTT", "bstack"),
("===", "bstackportrait")
);
# Number of master windows (used by tile layouts)

View File

@ -80,8 +80,6 @@ static const NameFuncLink LayoutsList[] =
{"grid", grid},
{"spiral", spiral},
{"dwindle", dwindle},
{"bstack", bstack},
{"bstackportrait", bstackportrait},
{NULL, NULL}
};

View File

@ -2,7 +2,6 @@
* tile.c - tile layout
*
* Copyright © 2007 Julien Danjou <julien@danjou.info>
* Copyright © 2007 Ross Mohn <rpmohn@waxandwane.org>
*
* 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);
}

View File

@ -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