remove spiral from layouts
This commit is contained in:
parent
168492b15d
commit
57bb886dae
1
TODO
1
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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
7
config.c
7
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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* spiral.c - spiral layout
|
||||
*
|
||||
* Copyright © 2007 Julien Danjou <julien@danjou.info>
|
||||
* Copyright © 2007 Jeroen Schot <schot@a-eskwadraat.nl>
|
||||
*
|
||||
* 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);
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* spiral.h - spiral layout header
|
||||
*
|
||||
* Copyright © 2007 Julien Danjou <julien@danjou.info>
|
||||
* Copyright © 2007 Jeroen Schot <schot@a-eskwadraat.nl>
|
||||
*
|
||||
* 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
|
Loading…
Reference in New Issue