tremoved the direction flipping - dwm - [fork] customized build of dwm, the dyn… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 36178933ed53857d59046278afb25b7525cafb39 | |
parent ad0da9a571ecbdfa8fe0a397185b314f5654f094 | |
Author: Anselm R. Garbe <[email protected]> | |
Date: Fri, 29 Sep 2006 17:02:56 +0200 | |
removed the direction flipping | |
Diffstat: | |
M config.arg.h | 2 -- | |
M config.default.h | 2 -- | |
M dwm.h | 2 -- | |
M view.c | 78 +++++++----------------------… | |
4 files changed, 18 insertions(+), 66 deletions(-) | |
--- | |
diff --git a/config.arg.h b/config.arg.h | |
t@@ -10,7 +10,6 @@ const char *tags[] = { "dev", "work", "net", "fnord", NULL }; | |
#define FLOATSYMBOL "><>" | |
#define STACKPOS StackRight /* StackLeft */ | |
#define TILESYMBOL "[]=" | |
-#define VERTICALSTACK True /* False == horizonta… | |
#define FONT "-*-terminus-medium-*-*-*-12-*-*-*-*-*-iso… | |
#define NORMBGCOLOR "#333333" | |
t@@ -37,7 +36,6 @@ static Key key[] = { \ | |
{ MODKEY, XK_k, focusprev, … | |
{ MODKEY, XK_Return, zoom, … | |
{ MODKEY, XK_b, togglestackpos, … | |
- { MODKEY, XK_d, togglestackdir, … | |
{ MODKEY, XK_g, resizecol, … | |
{ MODKEY, XK_s, resizecol, … | |
{ MODKEY|ShiftMask, XK_1, tag, … | |
diff --git a/config.default.h b/config.default.h | |
t@@ -10,7 +10,6 @@ const char *tags[] = { "1", "2", "3", "4", "5", NULL }; | |
#define FLOATSYMBOL "><>" | |
#define STACKPOS StackRight /* StackLeft */ | |
#define TILESYMBOL "[]=" | |
-#define VERTICALSTACK True /* False == horizonta… | |
#define FONT "fixed" | |
#define NORMBGCOLOR "#333366" | |
t@@ -31,7 +30,6 @@ static Key key[] = { \ | |
{ MODKEY|ShiftMask, XK_Tab, focusprev, … | |
{ MODKEY, XK_Return, zoom, … | |
{ MODKEY, XK_b, togglestackpos, … | |
- { MODKEY, XK_d, togglestackdir, … | |
{ MODKEY, XK_g, resizecol, … | |
{ MODKEY, XK_s, resizecol, … | |
{ MODKEY|ShiftMask, XK_1, tag, … | |
diff --git a/dwm.h b/dwm.h | |
t@@ -108,7 +108,6 @@ extern void (*handler[LASTEvent])(XEvent *); /* eve… | |
extern void (*arrange)(Arg *); /* arrange function, ind… | |
extern Atom wmatom[WMLast], netatom[NetLast]; | |
extern Bool running, issel, *seltag; /* seltag is array of Bool… | |
-extern Bool isvertical; /* stack direction */ | |
extern Client *clients, *sel, *stack; /* global client list and… | |
extern Cursor cursor[CurLast]; | |
extern DC dc; /* global draw context */ | |
t@@ -172,7 +171,6 @@ extern void focusprev(Arg *arg); /* focuses… | |
extern Bool isvisible(Client *c); /* returns True if client is … | |
extern void resizecol(Arg *arg); /* resizes the master dimensio… | |
extern void restack(void); /* restores z layers of all … | |
-extern void togglestackdir(Arg *arg); /* toggles stack directio… | |
extern void togglestackpos(Arg *arg); /* toggles stack position… | |
extern void togglemode(Arg *arg); /* toggles global arrange fun… | |
extern void toggleview(Arg *arg); /* toggles the tag with arg's… | |
diff --git a/view.c b/view.c | |
t@@ -65,7 +65,6 @@ togglemax(Client *c) | |
/* extern */ | |
void (*arrange)(Arg *) = DEFMODE; | |
-Bool isvertical = VERTICALSTACK; | |
StackPos stackpos = STACKPOS; | |
void | |
t@@ -119,20 +118,11 @@ dotile(Arg *arg) { | |
stackh = sh - bh; | |
} | |
- if(isvertical) { | |
- tw = stackw; | |
- if(n > 1) | |
- th = stackh / (n - 1); | |
- else | |
- th = stackh; | |
- } | |
- else { | |
+ tw = stackw; | |
+ if(n > 1) | |
+ th = stackh / (n - 1); | |
+ else | |
th = stackh; | |
- if(n > 1) | |
- tw = stackw / (n - 1); | |
- else | |
- tw = stackw; | |
- } | |
for(i = 0, c = clients; c; c = c->next) { | |
if(isvisible(c)) { | |
t@@ -169,56 +159,32 @@ dotile(Arg *arg) { | |
break; | |
} | |
} | |
- else if((isvertical && th > bh) || (!isvertical && tw … | |
+ else if(th > bh) { | |
/* tile window */ | |
c->w = tw - 2 * BORDERPX; | |
c->h = th - 2 * BORDERPX; | |
switch(stackpos) { | |
case StackLeft: | |
- if(isvertical) { | |
- c->x = sx; | |
- c->y = sy + (i - 1) * th + bh; | |
- if(i + 1 == n) | |
- c->h = sh - c->y - 2 *… | |
- } | |
- else { | |
- c->x = sx + (i - 1) * tw; | |
- c->y = sy + bh; | |
- if(i + 1 == n) | |
- c->w = sx + stackw - c… | |
- } | |
+ c->x = sx; | |
+ c->y = sy + (i - 1) * th + bh; | |
+ if(i + 1 == n) | |
+ c->h = sh - c->y - 2 * BORDERP… | |
break; | |
case StackBottom: | |
- if(isvertical) { | |
- c->x = sx; | |
- c->y = sy + master + (i - 1) *… | |
- if(i + 1 == n) | |
- c->h = sh - c->y - 2 *… | |
- } | |
- else { | |
- c->x = sx + (i - 1) * tw; | |
- c->y = sy + bh + master; | |
- if(i + 1 == n) | |
- c->w = sw - c->x - 2 *… | |
- } | |
+ c->x = sx; | |
+ c->y = sy + master + (i - 1) * th + bh; | |
+ if(i + 1 == n) | |
+ c->h = sh - c->y - 2 * BORDERP… | |
break; | |
case StackRight: | |
- if(isvertical) { | |
- c->x = sx + master; | |
- c->y = sy + (i - 1) * th + bh; | |
- if(i + 1 == n) | |
- c->h = sh - c->y - 2 *… | |
- } | |
- else { | |
- c->x = sx + master + (i - 1) *… | |
- c->y = sy + bh; | |
- if(i + 1 == n) | |
- c->w = sw - c->x - 2 *… | |
- } | |
+ c->x = sx + master; | |
+ c->y = sy + (i - 1) * th + bh; | |
+ if(i + 1 == n) | |
+ c->h = sh - c->y - 2 * BORDERP… | |
break; | |
} | |
} | |
- else { /* fallback if th < bh resp. tw < MINW */ | |
+ else { /* fallback if th < bh */ | |
c->w = stackw - 2 * BORDERPX; | |
c->h = stackh - 2 * BORDERPX; | |
switch(stackpos) { | |
t@@ -360,14 +326,6 @@ toggleview(Arg *arg) { | |
} | |
void | |
-togglestackdir(Arg *arg) { | |
- if(arrange == dofloat) | |
- return; | |
- isvertical = !isvertical; | |
- arrange(NULL); | |
-} | |
- | |
-void | |
togglestackpos(Arg *arg) { | |
if(arrange == dofloat) | |
return; |