summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-05 09:02:37 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-05 09:02:37 +0200
commit6499fc4f938eb7e61ab3e25df3904db9c890c693 (patch)
treebbe84ad7310956ec3de01e86145905af7658e3b2
parent04f27a54380cbd2bb24d8a86b672af34bb38d2fa (diff)
downloaddwm-6499fc4f938eb7e61ab3e25df3904db9c890c693.tar.gz
I really need column growing, now pushing upstream
-rw-r--r--config.arg.h1
-rw-r--r--config.default.h1
-rw-r--r--dwm.16
-rw-r--r--dwm.h1
-rw-r--r--view.c18
5 files changed, 27 insertions, 0 deletions
diff --git a/config.arg.h b/config.arg.h
index 7636b93..f60079c 100644
--- a/config.arg.h
+++ b/config.arg.h
@@ -34,6 +34,7 @@ static Key key[] = { \
{ MODKEY, XK_k, focusprev, { 0 } }, \
{ MODKEY, XK_Return, zoom, { 0 } }, \
{ MODKEY, XK_m, togglemax, { 0 } }, \
+ { MODKEY, XK_g, growcol, { .i = 20 } }, \
{ MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
{ MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \
{ MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \
diff --git a/config.default.h b/config.default.h
index 3f46d8d..2fff7d4 100644
--- a/config.default.h
+++ b/config.default.h
@@ -29,6 +29,7 @@ static Key key[] = { \
{ MODKEY|ShiftMask, XK_Tab, focusprev, { 0 } }, \
{ MODKEY, XK_Return, zoom, { 0 } }, \
{ MODKEY, XK_m, togglemax, { 0 } }, \
+ { MODKEY, XK_g, growcol, { .i = 20 } }, \
{ MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
{ MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \
{ MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \
diff --git a/dwm.1 b/dwm.1
index 31ebad0..4d5da75 100644
--- a/dwm.1
+++ b/dwm.1
@@ -90,6 +90,12 @@ mode only).
Maximize current
.BR window .
.TP
+.B Mod1-g
+Grow current
+.BR column
+.RB ( tiling
+mode only).
+.TP
.B Mod1-Shift-[1..n]
Apply
.B nth tag
diff --git a/dwm.h b/dwm.h
index e1df6bc..0c37711 100644
--- a/dwm.h
+++ b/dwm.h
@@ -131,6 +131,7 @@ extern void dofloat(Arg *arg);
extern void dotile(Arg *arg);
extern void focusnext(Arg *arg);
extern void focusprev(Arg *arg);
+extern void growcol(Arg *arg);
extern Bool isvisible(Client *c);
extern void restack();
extern void togglemode(Arg *arg);
diff --git a/view.c b/view.c
index ac3d495..dc10e5e 100644
--- a/view.c
+++ b/view.c
@@ -169,6 +169,24 @@ focusprev(Arg *arg)
}
}
+void
+growcol(Arg *arg)
+{
+ if(!sel || (arrange != dotile))
+ return;
+ if(sel == getnext(clients)) {
+ if(mw + arg->i > sw - 100)
+ return;
+ mw += arg->i;
+ }
+ else {
+ if(mw - arg->i < 100)
+ return;
+ mw -= arg->i;
+ }
+ arrange(NULL);
+}
+
Bool
isvisible(Client *c)
{