diff --git a/awesomerc b/awesomerc index c3ec9a33..b42f7f48 100644 --- a/awesomerc +++ b/awesomerc @@ -25,8 +25,7 @@ awesome: # Available layouts layouts = (("[]=", "tile"), ("=[]", "tileleft"), - ("+++", "grid"), -# ("(@)", "spiral"), + ("(@)", "spiral"), ("[\]", "dwindle"), ("><>", "floating"), ); diff --git a/config.c b/config.c index e64ff20f..b28254c0 100644 --- a/config.c +++ b/config.c @@ -31,7 +31,6 @@ #include "layout.h" #include "tag.h" #include "layouts/tile.h" -#include "layouts/grid.h" #include "layouts/spiral.h" #include "layouts/floating.h" @@ -77,7 +76,6 @@ static const NameFuncLink LayoutsList[] = {"tile", tile}, {"tileleft", tileleft}, {"floating", floating}, - {"grid", grid}, {"spiral", spiral}, {"dwindle", dwindle}, {NULL, NULL} diff --git a/config.mk b/config.mk index e9168f9f..e97e4967 100644 --- a/config.mk +++ b/config.mk @@ -4,7 +4,7 @@ VERSION = devel # Customize below to fit your system # additional layouts beside floating -LAYOUTS = layouts/tile.c layouts/grid.c layouts/spiral.c layouts/floating.c +LAYOUTS = layouts/tile.c layouts/spiral.c layouts/floating.c # paths PREFIX = /usr/local diff --git a/layouts/grid.c b/layouts/grid.c deleted file mode 100644 index 65c2d4fe..00000000 --- a/layouts/grid.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * grid.c - grid layout - * - * Copyright © 2007 Julien Danjou - * Copyright © 2007 Alexandru E. Ungur - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include "awesome.h" -#include "grid.h" -#include "layout.h" -#include "tag.h" - -extern Client *clients; /* global client list and stack */ - -void -grid(Display *disp, awesome_config *awesomeconf) -{ - unsigned int i, n, cx, cy, cw, ch, aw, ah, cols, rows; - int waw = get_windows_area_width(disp, awesomeconf->statusbar); - int wah = get_windows_area_height(disp, awesomeconf->statusbar); - Client *c; - - for(n = 0, c = clients; c; c = c->next) - if(IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags)) - n++; - - /* grid dimensions */ - for(rows = 0; rows <= n / 2; rows++) - if(rows * rows >= n) - break; - cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows; - - /* window geoms (cell height/width) */ - ch = wah / (rows ? rows : 1); - cw = waw / (cols ? cols : 1); - - for(i = 0, c = clients; c; c = c->next) - { - if(!IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags)) - continue; - c->ismax = False; - cx = (i / rows) * cw; - cy = (i % rows) * ch + (awesomeconf->statusbar.position == BarTop ? awesomeconf->statusbar.height : 0); // bh? adjust - /* adjust height/width of last row/column's windows */ - ah = ((i + 1) % rows == 0) ? wah - ch * rows : 0; - aw = (i >= rows * (cols - 1)) ? waw - cw * cols : 0; - resize(c, cx, cy, cw - 2 * c->border + aw, ch - 2 * c->border + ah, False); - i++; - } -} diff --git a/layouts/grid.h b/layouts/grid.h deleted file mode 100644 index 4b40e10c..00000000 --- a/layouts/grid.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * grid.h - grid layout header - * - * Copyright © 2007 Julien Danjou - * Copyright © 2007 Alexandru E. Ungur - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#ifndef AWESOME_GRID_H -#define AWESOME_GRID_H - -#include "config.h" - -/* grid.c */ -void grid(Display *, awesome_config *); - -#endif