new feature: add max layout
This commit is contained in:
parent
5602e9e76b
commit
c80855836a
|
@ -27,6 +27,7 @@ awesome:
|
||||||
layouts = (
|
layouts = (
|
||||||
("[]=", "tile"),
|
("[]=", "tile"),
|
||||||
("=[]", "tileleft"),
|
("=[]", "tileleft"),
|
||||||
|
("[ ]", "max"),
|
||||||
("><>", "floating")
|
("><>", "floating")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
2
config.c
2
config.c
|
@ -34,6 +34,7 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "statusbar.h"
|
#include "statusbar.h"
|
||||||
#include "layouts/tile.h"
|
#include "layouts/tile.h"
|
||||||
|
#include "layouts/max.h"
|
||||||
#include "layouts/floating.h"
|
#include "layouts/floating.h"
|
||||||
|
|
||||||
static void initfont(const char *, Display *, DC *);
|
static void initfont(const char *, Display *, DC *);
|
||||||
|
@ -73,6 +74,7 @@ static const NameFuncLink LayoutsList[] =
|
||||||
{
|
{
|
||||||
{"tile", layout_tile},
|
{"tile", layout_tile},
|
||||||
{"tileleft", layout_tileleft},
|
{"tileleft", layout_tileleft},
|
||||||
|
{"max", layout_max},
|
||||||
{"floating", layout_floating},
|
{"floating", layout_floating},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@ VERSION = devel
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
# additional layouts beside floating
|
# additional layouts beside floating
|
||||||
LAYOUTS = layouts/tile.c layouts/floating.c
|
LAYOUTS = layouts/tile.c layouts/floating.c layouts/max.c
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
* floating.c - floating layout
|
* floating.c - floating layout
|
||||||
*
|
*
|
||||||
* Copyright © 2007 Julien Danjou <julien@danjou.info>
|
* Copyright © 2007 Julien Danjou <julien@danjou.info>
|
||||||
* Copyright © 2007 Alexandru E. Ungur <grid@rb.no-ip.biz>
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* max.c - max layout
|
||||||
|
*
|
||||||
|
* Copyright © 2007 Julien Danjou <julien@danjou.info>
|
||||||
|
*
|
||||||
|
* 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 "tag.h"
|
||||||
|
#include "screen.h"
|
||||||
|
#include "layouts/max.h"
|
||||||
|
|
||||||
|
/* extern */
|
||||||
|
extern Client *clients; /* global client */
|
||||||
|
|
||||||
|
void
|
||||||
|
layout_max(Display *disp, awesome_config *awesomeconf)
|
||||||
|
{
|
||||||
|
Client *c;
|
||||||
|
int dummy;
|
||||||
|
ScreenInfo *si = get_screen_info(disp, awesomeconf->screen, awesomeconf->statusbar, &dummy);
|
||||||
|
|
||||||
|
for(c = clients; c; c = c->next)
|
||||||
|
if(IS_TILED(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags))
|
||||||
|
resize(c, si[awesomeconf->screen].x_org, si[awesomeconf->screen].y_org,
|
||||||
|
si[awesomeconf->screen].width - 2 * c->border,
|
||||||
|
si[awesomeconf->screen].height - 2 * c->border, awesomeconf->resize_hints);
|
||||||
|
XFree(si);
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* max.h - max layout header
|
||||||
|
*
|
||||||
|
* Copyright © 2007 Julien Danjou <julien@danjou.info>
|
||||||
|
*
|
||||||
|
* 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_MAX_H
|
||||||
|
#define AWESOME_MAX_H
|
||||||
|
|
||||||
|
void layout_max(Display *, awesome_config *);
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue