aewl
changeset 511:1599c953647b
removed the direction flipping
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Fri, 29 Sep 2006 17:02:56 +0200 |
parents | 0dfa6b752aed |
children | aca04c3022c1 |
files | config.arg.h config.default.h dwm.h view.c |
diffstat | 4 files changed, 18 insertions(+), 66 deletions(-) [+] |
line diff
1.1 --- a/config.arg.h Fri Sep 29 16:54:15 2006 +0200 1.2 +++ b/config.arg.h Fri Sep 29 17:02:56 2006 +0200 1.3 @@ -10,7 +10,6 @@ 1.4 #define FLOATSYMBOL "><>" 1.5 #define STACKPOS StackRight /* StackLeft */ 1.6 #define TILESYMBOL "[]=" 1.7 -#define VERTICALSTACK True /* False == horizontal stack */ 1.8 1.9 #define FONT "-*-terminus-medium-*-*-*-12-*-*-*-*-*-iso10646-*" 1.10 #define NORMBGCOLOR "#333333" 1.11 @@ -37,7 +36,6 @@ 1.12 { MODKEY, XK_k, focusprev, { 0 } }, \ 1.13 { MODKEY, XK_Return, zoom, { 0 } }, \ 1.14 { MODKEY, XK_b, togglestackpos, { 0 } }, \ 1.15 - { MODKEY, XK_d, togglestackdir, { 0 } }, \ 1.16 { MODKEY, XK_g, resizecol, { .i = 20 } }, \ 1.17 { MODKEY, XK_s, resizecol, { .i = -20 } }, \ 1.18 { MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
2.1 --- a/config.default.h Fri Sep 29 16:54:15 2006 +0200 2.2 +++ b/config.default.h Fri Sep 29 17:02:56 2006 +0200 2.3 @@ -10,7 +10,6 @@ 2.4 #define FLOATSYMBOL "><>" 2.5 #define STACKPOS StackRight /* StackLeft */ 2.6 #define TILESYMBOL "[]=" 2.7 -#define VERTICALSTACK True /* False == horizontal stack */ 2.8 2.9 #define FONT "fixed" 2.10 #define NORMBGCOLOR "#333366" 2.11 @@ -31,7 +30,6 @@ 2.12 { MODKEY|ShiftMask, XK_Tab, focusprev, { 0 } }, \ 2.13 { MODKEY, XK_Return, zoom, { 0 } }, \ 2.14 { MODKEY, XK_b, togglestackpos, { 0 } }, \ 2.15 - { MODKEY, XK_d, togglestackdir, { 0 } }, \ 2.16 { MODKEY, XK_g, resizecol, { .i = 20 } }, \ 2.17 { MODKEY, XK_s, resizecol, { .i = -20 } }, \ 2.18 { MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
3.1 --- a/dwm.h Fri Sep 29 16:54:15 2006 +0200 3.2 +++ b/dwm.h Fri Sep 29 17:02:56 2006 +0200 3.3 @@ -108,7 +108,6 @@ 3.4 extern void (*arrange)(Arg *); /* arrange function, indicates mode */ 3.5 extern Atom wmatom[WMLast], netatom[NetLast]; 3.6 extern Bool running, issel, *seltag; /* seltag is array of Bool */ 3.7 -extern Bool isvertical; /* stack direction */ 3.8 extern Client *clients, *sel, *stack; /* global client list and stack */ 3.9 extern Cursor cursor[CurLast]; 3.10 extern DC dc; /* global draw context */ 3.11 @@ -172,7 +171,6 @@ 3.12 extern Bool isvisible(Client *c); /* returns True if client is visible */ 3.13 extern void resizecol(Arg *arg); /* resizes the master dimension with arg's index value */ 3.14 extern void restack(void); /* restores z layers of all clients */ 3.15 -extern void togglestackdir(Arg *arg); /* toggles stack direction */ 3.16 extern void togglestackpos(Arg *arg); /* toggles stack position */ 3.17 extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */ 3.18 extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */
4.1 --- a/view.c Fri Sep 29 16:54:15 2006 +0200 4.2 +++ b/view.c Fri Sep 29 17:02:56 2006 +0200 4.3 @@ -65,7 +65,6 @@ 4.4 /* extern */ 4.5 4.6 void (*arrange)(Arg *) = DEFMODE; 4.7 -Bool isvertical = VERTICALSTACK; 4.8 StackPos stackpos = STACKPOS; 4.9 4.10 void 4.11 @@ -119,20 +118,11 @@ 4.12 stackh = sh - bh; 4.13 } 4.14 4.15 - if(isvertical) { 4.16 - tw = stackw; 4.17 - if(n > 1) 4.18 - th = stackh / (n - 1); 4.19 - else 4.20 - th = stackh; 4.21 - } 4.22 - else { 4.23 + tw = stackw; 4.24 + if(n > 1) 4.25 + th = stackh / (n - 1); 4.26 + else 4.27 th = stackh; 4.28 - if(n > 1) 4.29 - tw = stackw / (n - 1); 4.30 - else 4.31 - tw = stackw; 4.32 - } 4.33 4.34 for(i = 0, c = clients; c; c = c->next) { 4.35 if(isvisible(c)) { 4.36 @@ -169,56 +159,32 @@ 4.37 break; 4.38 } 4.39 } 4.40 - else if((isvertical && th > bh) || (!isvertical && tw > MINW)) { 4.41 + else if(th > bh) { 4.42 /* tile window */ 4.43 c->w = tw - 2 * BORDERPX; 4.44 c->h = th - 2 * BORDERPX; 4.45 switch(stackpos) { 4.46 case StackLeft: 4.47 - if(isvertical) { 4.48 - c->x = sx; 4.49 - c->y = sy + (i - 1) * th + bh; 4.50 - if(i + 1 == n) 4.51 - c->h = sh - c->y - 2 * BORDERPX; 4.52 - } 4.53 - else { 4.54 - c->x = sx + (i - 1) * tw; 4.55 - c->y = sy + bh; 4.56 - if(i + 1 == n) 4.57 - c->w = sx + stackw - c->x - 2 * BORDERPX; 4.58 - } 4.59 + c->x = sx; 4.60 + c->y = sy + (i - 1) * th + bh; 4.61 + if(i + 1 == n) 4.62 + c->h = sh - c->y - 2 * BORDERPX; 4.63 break; 4.64 case StackBottom: 4.65 - if(isvertical) { 4.66 - c->x = sx; 4.67 - c->y = sy + master + (i - 1) * th + bh; 4.68 - if(i + 1 == n) 4.69 - c->h = sh - c->y - 2 * BORDERPX; 4.70 - } 4.71 - else { 4.72 - c->x = sx + (i - 1) * tw; 4.73 - c->y = sy + bh + master; 4.74 - if(i + 1 == n) 4.75 - c->w = sw - c->x - 2 * BORDERPX; 4.76 - } 4.77 + c->x = sx; 4.78 + c->y = sy + master + (i - 1) * th + bh; 4.79 + if(i + 1 == n) 4.80 + c->h = sh - c->y - 2 * BORDERPX; 4.81 break; 4.82 case StackRight: 4.83 - if(isvertical) { 4.84 - c->x = sx + master; 4.85 - c->y = sy + (i - 1) * th + bh; 4.86 - if(i + 1 == n) 4.87 - c->h = sh - c->y - 2 * BORDERPX; 4.88 - } 4.89 - else { 4.90 - c->x = sx + master + (i - 1) * tw; 4.91 - c->y = sy + bh; 4.92 - if(i + 1 == n) 4.93 - c->w = sw - c->x - 2 * BORDERPX; 4.94 - } 4.95 + c->x = sx + master; 4.96 + c->y = sy + (i - 1) * th + bh; 4.97 + if(i + 1 == n) 4.98 + c->h = sh - c->y - 2 * BORDERPX; 4.99 break; 4.100 } 4.101 } 4.102 - else { /* fallback if th < bh resp. tw < MINW */ 4.103 + else { /* fallback if th < bh */ 4.104 c->w = stackw - 2 * BORDERPX; 4.105 c->h = stackh - 2 * BORDERPX; 4.106 switch(stackpos) { 4.107 @@ -360,14 +326,6 @@ 4.108 } 4.109 4.110 void 4.111 -togglestackdir(Arg *arg) { 4.112 - if(arrange == dofloat) 4.113 - return; 4.114 - isvertical = !isvertical; 4.115 - arrange(NULL); 4.116 -} 4.117 - 4.118 -void 4.119 togglestackpos(Arg *arg) { 4.120 if(arrange == dofloat) 4.121 return;