diff --git a/TODO b/TODO index 19a2cd21..f5d7b761 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,6 @@ For v1.0: - Add uicb for sel->border++-- and awesomeconf->border++-- - Remove warnings -- Check spiral layout - Check togglemax - Write manpage diff --git a/awesomerc b/awesomerc index 4f758381..7964f2f7 100644 --- a/awesomerc +++ b/awesomerc @@ -25,11 +25,9 @@ awesome: # Available layouts layouts = (("[]=", "tile"), - ("=[]", "tileleft"), - ("(@)", "spiral"), - ("[\]", "dwindle"), - ("><>", "floating"), - ); + ("=[]", "tileleft"), + ("><>", "floating") + ); # Number of master windows (used by tile layouts) nmaster = 2; diff --git a/config.c b/config.c index 2ccda260..4d4a8720 100644 --- a/config.c +++ b/config.c @@ -34,7 +34,6 @@ #include "util.h" #include "statusbar.h" #include "layouts/tile.h" -#include "layouts/spiral.h" #include "layouts/floating.h" static void initfont(const char *, Display *, DC *); @@ -75,8 +74,6 @@ static const NameFuncLink LayoutsList[] = {"tile", tile}, {"tileleft", tileleft}, {"floating", floating}, - {"spiral", spiral}, - {"dwindle", dwindle}, {NULL, NULL} }; @@ -154,7 +151,7 @@ name_func_lookup(const char *funcname, const NameFuncLink * list) * \param awesomeconf awesome config ref */ static void -set_default_config(awesome_config *awesomeconf, DC *drawcontext) +set_default_config(awesome_config *awesomeconf) { /** \todo most of this stuff aren't freed when we initialize * the real configuration, we should add a clean conf function */ @@ -213,7 +210,7 @@ parse_config(Display * disp, int scr, DC * drawcontext, awesome_config *awesomec char *confpath; KeySym tmp_key; - set_default_config(awesomeconf, drawcontext); + set_default_config(awesomeconf); homedir = getenv("HOME"); confpath = p_new(char, strlen(homedir) + strlen(AWESOME_CONFIG_FILE) + 2); diff --git a/config.mk b/config.mk index 603bb0d0..d3d23106 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/spiral.c layouts/floating.c +LAYOUTS = layouts/tile.c layouts/floating.c # paths PREFIX = /usr/local diff --git a/layouts/spiral.c b/layouts/spiral.c deleted file mode 100644 index 70de4d78..00000000 --- a/layouts/spiral.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * spiral.c - spiral layout - * - * Copyright © 2007 Julien Danjou - * Copyright © 2007 Jeroen Schot - * - * 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 "layout.h" -#include "tag.h" -#include "spiral.h" - -extern Client *clients; /* global client list */ - -static void -fibonacci(Display *disp, awesome_config *awesomeconf, int shape) -{ - int n, nx, ny, nh, nw, i; - Client *c; - - nx = get_windows_area_x(awesomeconf->statusbar); - ny = 0; - nw = get_windows_area_width(disp, awesomeconf->statusbar); - nh = get_windows_area_height(disp, awesomeconf->statusbar); - for(n = 0, c = clients; c; c = c->next) - if(IS_TILED(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags)) - n++; - - for(i = 0, c = clients; c; c = c->next) - { - if(!IS_TILED(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags)) - continue; - - c->ismax = False; - if((i % 2 && nh / 2 > 2 * c->border) - || (!(i % 2) && nw / 2 > 2 * c->border)) - { - if(i < n - 1) - { - if(i % 2) - nh /= 2; - else - nw /= 2; - if((i % 4) == 2 && !shape) - ny += nh; - } - if((i % 4) == 0) - { - if(shape) - ny += nh; - else - ny -= nh; - } - else if((i % 4) == 1) - nx += nw; - else if((i % 4) == 2) - ny += nh; - else if((i % 4) == 3) - { - if(shape) - nx += nw; - else - nx -= nw; - } - if(i == 0) - ny = get_windows_area_y(awesomeconf->statusbar); - i++; - } - resize(c, nx, ny, nw - 2 * c->border, nh - 2 * c->border, False); - } -} - - -void -dwindle(Display *disp, awesome_config *awesomeconf) -{ - fibonacci(disp, awesomeconf, 1); -} - -void -spiral(Display *disp, awesome_config *awesomeconf) -{ - fibonacci(disp, awesomeconf, 0); -} diff --git a/layouts/spiral.h b/layouts/spiral.h deleted file mode 100644 index 0df48d06..00000000 --- a/layouts/spiral.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * spiral.h - spiral layout header - * - * Copyright © 2007 Julien Danjou - * Copyright © 2007 Jeroen Schot - * - * 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_SPIRAL_H -#define AWESOME_SPIRAL_H - -void dwindle(Display *, awesome_config *); /* dwindle windows */ -void spiral(Display *, awesome_config *); /* spiral windows */ - -#endif