author | Anselm R. Garbe <arg@suckless.org> |
Mon, 04 Jun 2007 11:50:48 +0200 | |
changeset 915 | 67104d329f06 |
parent 914 | dad36921af06 |
child 918 | 7c556b28f1f6 |
permissions | -rw-r--r-- |
910
c13cb8c6b7a5
referred to LICENSE file
Anselm R. Garbe <arg@suckless.org>
parents:
909
diff
changeset
|
1 |
/* See LICENSE file for copyright and license details. */ |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
2 |
#include "dwm.h" |
825
bef1854ce739
fixed some issues due to the Arg->const char * transition
Anselm R. Garbe <arg@suckless.org>
parents:
823
diff
changeset
|
3 |
#include <stdlib.h> |
75 | 4 |
|
782
92862ab407d5
introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents:
780
diff
changeset
|
5 |
unsigned int blw = 0; |
92862ab407d5
introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents:
780
diff
changeset
|
6 |
Layout *lt = NULL; |
773
81c5237a53b8
merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents:
769
diff
changeset
|
7 |
|
81c5237a53b8
merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents:
769
diff
changeset
|
8 |
/* static */ |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
9 |
|
782
92862ab407d5
introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents:
780
diff
changeset
|
10 |
static unsigned int nlayouts = 0; |
813
0ed770c96e51
several changes, made togglemax extern and separated it from zoom() - moved zoom() and togglemax() into layout.c, changed void (*func)(Arg *) into void (*func)(Arg), changed default keybindings of focusnext/focusprev and incmasterw to h/j/k/l accordingly, made keys in config*h appear alphabetically (special keys first), renamed resizemaster into incmasterw, renamed MASTER into MASTERWIDTH
Anselm R. Garbe <arg@suckless.org>
parents:
799
diff
changeset
|
11 |
static unsigned int masterw = MASTERWIDTH; |
0ed770c96e51
several changes, made togglemax extern and separated it from zoom() - moved zoom() and togglemax() into layout.c, changed void (*func)(Arg *) into void (*func)(Arg), changed default keybindings of focusnext/focusprev and incmasterw to h/j/k/l accordingly, made keys in config*h appear alphabetically (special keys first), renamed resizemaster into incmasterw, renamed MASTER into MASTERWIDTH
Anselm R. Garbe <arg@suckless.org>
parents:
799
diff
changeset
|
12 |
static unsigned int nmaster = NMASTER; |
191 | 13 |
|
784
74722317b171
renamed floating into swimming (this does not clash with C naming conventions and fits better the fish symbol) - also in man page
Anselm R. Garbe <arg@suckless.org>
parents:
782
diff
changeset
|
14 |
static void |
74722317b171
renamed floating into swimming (this does not clash with C naming conventions and fits better the fish symbol) - also in man page
Anselm R. Garbe <arg@suckless.org>
parents:
782
diff
changeset
|
15 |
tile(void) { |
898
6c8b43d7b616
calculating the remainder for master and stack area correctly
Anselm R. Garbe <arg@suckless.org>
parents:
892
diff
changeset
|
16 |
unsigned int i, n, nx, ny, nw, nh, mw, mh, tw, th; |
773
81c5237a53b8
merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents:
769
diff
changeset
|
17 |
Client *c; |
81c5237a53b8
merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents:
769
diff
changeset
|
18 |
|
776
be103ae46dbc
renamed view.c into screen.c
Anselm R. Garbe <arg@suckless.org>
parents:
775
diff
changeset
|
19 |
for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) |
773
81c5237a53b8
merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents:
769
diff
changeset
|
20 |
n++; |
81c5237a53b8
merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents:
769
diff
changeset
|
21 |
/* window geoms */ |
81c5237a53b8
merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents:
769
diff
changeset
|
22 |
mh = (n > nmaster) ? wah / nmaster : wah / (n > 0 ? n : 1); |
813
0ed770c96e51
several changes, made togglemax extern and separated it from zoom() - moved zoom() and togglemax() into layout.c, changed void (*func)(Arg *) into void (*func)(Arg), changed default keybindings of focusnext/focusprev and incmasterw to h/j/k/l accordingly, made keys in config*h appear alphabetically (special keys first), renamed resizemaster into incmasterw, renamed MASTER into MASTERWIDTH
Anselm R. Garbe <arg@suckless.org>
parents:
799
diff
changeset
|
23 |
mw = (n > nmaster) ? (waw * masterw) / 1000 : waw; |
773
81c5237a53b8
merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents:
769
diff
changeset
|
24 |
th = (n > nmaster) ? wah / (n - nmaster) : 0; |
81c5237a53b8
merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents:
769
diff
changeset
|