Introduction
Introduction Statistics Contact Development Disclaimer Help
tremoved the stack position stuff - dwm - [fork] customized build of dwm, the d…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 10885d349a8426f0a55f34e78a2592267e8e55be
parent 1c1d09f3e9eb18175f48bcc212d07684577ba4a6
Author: Anselm R. Garbe <[email protected]>
Date: Thu, 5 Oct 2006 19:27:28 +0200
removed the stack position stuff
Diffstat:
M config.arg.h | 11 ++++-------
M config.default.h | 11 ++++-------
M draw.c | 4 +---
M dwm.1 | 6 +-----
M dwm.h | 6 ------
M event.c | 8 ++------
M main.c | 5 +----
M view.c | 71 ++++++-----------------------…
8 files changed, 26 insertions(+), 96 deletions(-)
---
diff --git a/config.arg.h b/config.arg.h
t@@ -8,9 +8,7 @@ const char *tags[] = { "dev", "work", "net", "fnord", NULL };
#define DEFMODE dotile /* dofloat */
#define FLOATSYMBOL "><>"
-#define STACKPOS StackRight /* StackLeft */
-#define BSTACKSYMBOL "==="
-#define VSTACKSYMBOL "[]="
+#define TILESYMBOL "[]="
#define FONT "-*-terminus-medium-*-*-*-12-*-*-*-*-*-iso…
#define NORMBGCOLOR "#333333"
t@@ -20,7 +18,7 @@ const char *tags[] = { "dev", "work", "net", "fnord", NULL };
#define STATUSBGCOLOR "#222222"
#define STATUSFGCOLOR "#9999cc"
-#define MASTER 600 /* per mill */
+#define MASTER 600 /* per thousand */
#define MODKEY Mod1Mask
#define KEYS \
t@@ -36,9 +34,8 @@ static Key key[] = { \
{ MODKEY, XK_j, focusnext, …
{ MODKEY, XK_k, focusprev, …
{ MODKEY, XK_Return, zoom, …
- { MODKEY, XK_b, togglestackpos, …
- { MODKEY, XK_g, resizecol, …
- { MODKEY, XK_s, resizecol, …
+ { MODKEY, XK_g, resizecol, …
+ { MODKEY, XK_s, resizecol, …
{ MODKEY|ShiftMask, XK_1, tag, …
{ MODKEY|ShiftMask, XK_2, tag, …
{ MODKEY|ShiftMask, XK_3, tag, …
diff --git a/config.default.h b/config.default.h
t@@ -8,9 +8,7 @@ const char *tags[] = { "1", "2", "3", "4", "5", NULL };
#define DEFMODE dotile /* dofloat */
#define FLOATSYMBOL "><>"
-#define STACKPOS StackRight /* StackLeft */
-#define BSTACKSYMBOL "==="
-#define VSTACKSYMBOL "[]="
+#define TILESYMBOL "[]="
#define FONT "fixed"
#define NORMBGCOLOR "#333366"
t@@ -20,7 +18,7 @@ const char *tags[] = { "1", "2", "3", "4", "5", NULL };
#define STATUSBGCOLOR "#dddddd"
#define STATUSFGCOLOR "#222222"
-#define MASTER 600 /* per mill */
+#define MASTER 600 /* per thousand */
#define MODKEY Mod1Mask
#define KEYS \
t@@ -30,9 +28,8 @@ static Key key[] = { \
{ MODKEY, XK_Tab, focusnext, …
{ MODKEY|ShiftMask, XK_Tab, focusprev, …
{ MODKEY, XK_Return, zoom, …
- { MODKEY, XK_b, togglestackpos, …
- { MODKEY, XK_g, resizecol, …
- { MODKEY, XK_s, resizecol, …
+ { MODKEY, XK_g, resizecol, …
+ { MODKEY, XK_s, resizecol, …
{ MODKEY|ShiftMask, XK_1, tag, …
{ MODKEY|ShiftMask, XK_2, tag, …
{ MODKEY|ShiftMask, XK_3, tag, …
diff --git a/draw.c b/draw.c
t@@ -104,9 +104,7 @@ drawstatus(void) {
}
dc.w = bmw;
- drawtext(arrange == dofloat ?
- FLOATSYMBOL : stackpos == StackBottom ?
- BSTACKSYMBOL : VSTACKSYMBOL, dc.status, False);
+ drawtext(arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, dc.status, Fa…
x = dc.x + dc.w;
dc.w = textw(stext);
diff --git a/dwm.1 b/dwm.1
t@@ -40,8 +40,7 @@ click on a tag label to display all windows with that tag, c…
label toggles between tiling and floating mode.
.TP
.B Button3
-click on a tag label adds/removes all windows with that tag to/from the view,
-click on the mode label toggles the stack position (tiling mode).
+click on a tag label adds/removes all windows with that tag to/from the view.
.TP
.B Mod1-Button1
click on a tag label applies that tag to the focused window.
t@@ -63,9 +62,6 @@ Focus previous window.
.B Mod1-Return
Zooms/cycles current window to/from master area (tiling mode), toggles maximiz…
.TP
-.B Mod1-b
-Toggle stack position (tiling mode only).
-.TP
.B Mod1-g
Grow current area (tiling mode only).
.TP
diff --git a/dwm.h b/dwm.h
t@@ -48,10 +48,6 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* …
enum { ColFG, ColBG, ColLast }; /* color */
typedef enum {
- StackLeft, StackBottom, StackRight
-} StackPos; /* stack position*/
-
-typedef enum {
TopLeft, TopRight, BotLeft, BotRight
} Corner; /* window corners */
t@@ -111,7 +107,6 @@ extern Client *clients, *sel, *stack; /* gl…
extern Cursor cursor[CurLast];
extern DC dc; /* global draw context */
extern Display *dpy;
-extern StackPos stackpos;
extern Window root, barwin;
/* client.c */
t@@ -170,7 +165,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 percent …
extern void restack(void); /* restores z layers of all …
-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…
extern void view(Arg *arg); /* views the tag with arg's…
diff --git a/event.c b/event.c
t@@ -123,12 +123,8 @@ buttonpress(XEvent *e) {
return;
}
}
- if(ev->x < x + bmw) {
- if(ev->button == Button1)
- togglemode(NULL);
- else if(ev->button == Button3)
- togglestackpos(NULL);
- }
+ if((ev->x < x + bmw) && (ev->button == Button1))
+ togglemode(NULL);
}
else if((c = getclient(ev->window))) {
focus(c);
diff --git a/main.c b/main.c
t@@ -129,10 +129,7 @@ setup(void) {
dc.status[ColFG] = getcolor(STATUSFGCOLOR);
setfont(FONT);
- bmw = textw(VSTACKSYMBOL) > textw(BSTACKSYMBOL) ?
- textw(VSTACKSYMBOL) : textw(BSTACKSYMBOL);
- bmw = bmw > textw(FLOATSYMBOL) ?
- bmw : textw(FLOATSYMBOL);
+ bmw = textw(TILESYMBOL) > textw(FLOATSYMBOL) ? textw(TILESYMBOL) : te…
sx = sy = 0;
sw = DisplayWidth(dpy, screen);
sh = DisplayHeight(dpy, screen);
diff --git a/view.c b/view.c
t@@ -65,7 +65,6 @@ togglemax(Client *c)
/* extern */
void (*arrange)(Arg *) = DEFMODE;
-StackPos stackpos = STACKPOS;
void
detach(Client *c) {
t@@ -103,28 +102,19 @@ dofloat(Arg *arg) {
*/
void
dotile(Arg *arg) {
- unsigned int i, n, md, stackw, stackh, tw, th;
+ unsigned int i, n, md, stackw, stackh, th;
Client *c;
for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
n++;
- if(stackpos == StackBottom) {
- md = ((sh - bh) * master) / 1000;
- stackw = sw;
- stackh = sh - bh - md;
- }
- else {
- md = (sw * master) / 1000;
- stackw = sw - md;
- stackh = sh - bh;
- }
+ md = (sw * master) / 1000;
+ stackw = sw - md;
+ stackh = sh - bh;
- tw = stackw;
+ th = stackh;
if(n > 1)
- th = stackh / (n - 1);
- else
- th = stackh;
+ th /= (n - 1);
for(i = 0, c = clients; c; c = c->next) {
if(isvisible(c)) {
t@@ -140,43 +130,19 @@ dotile(Arg *arg) {
c->h = sh - 2 * BORDERPX - bh;
}
else if(i == 0) { /* master window */
- if(stackpos == StackLeft)
- c->x += stackw;
- switch(stackpos) {
- case StackLeft:
- case StackRight:
- c->w = md - 2 * BORDERPX;
- c->h = sh - bh - 2 * BORDERPX;
- break;
- case StackBottom:
- c->w = sw - 2 * BORDERPX;
- c->h = md - 2 * BORDERPX;
- break;
- }
+ c->w = md - 2 * BORDERPX;
+ c->h = sh - bh - 2 * BORDERPX;
}
else { /* tile window */
- if(stackpos == StackRight)
- c->x += md;
+ c->x += md;
if(th > bh) {
- switch(stackpos) {
- case StackLeft:
- case StackRight:
- c->y = sy + (i - 1) * th + bh;
- if(i + 1 == n)
- c->h = sh - c->y - 2 *…
- break;
- case StackBottom:
- c->y = sy + md + (i - 1) * th …
- if(i + 1 == n)
- c->h = sh - c->y - 2 *…
- break;
- }
- c->w = tw - 2 * BORDERPX;
+ c->y = sy + (i - 1) * th + bh;
+ if(i + 1 == n)
+ c->h = sh - c->y - 2 * BORDERP…
+ c->w = stackw - 2 * BORDERPX;
c->h = th - 2 * BORDERPX;
}
else { /* fallback if th < bh */
- if(stackpos == StackBottom)
- c->y += md;
c->w = stackw - 2 * BORDERPX;
c->h = stackh - 2 * BORDERPX;
}
t@@ -312,17 +278,6 @@ toggleview(Arg *arg) {
}
void
-togglestackpos(Arg *arg) {
- if(arrange == dofloat)
- return;
- if(stackpos == StackBottom)
- stackpos = STACKPOS;
- else
- stackpos = StackBottom;
- arrange(NULL);
-}
-
-void
view(Arg *arg) {
unsigned int i;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.