Browse Source

I really need column growing, now pushing upstream

main
Anselm R. Garbe 18 years ago
parent
commit
6499fc4f93
5 changed files with 27 additions and 0 deletions
  1. +1
    -0
      config.arg.h
  2. +1
    -0
      config.default.h
  3. +6
    -0
      dwm.1
  4. +1
    -0
      dwm.h
  5. +18
    -0
      view.c

+ 1
- 0
config.arg.h View File

@ -34,6 +34,7 @@ static Key key[] = { \
{ MODKEY, XK_k, focusprev, { 0 } }, \ { MODKEY, XK_k, focusprev, { 0 } }, \
{ MODKEY, XK_Return, zoom, { 0 } }, \ { MODKEY, XK_Return, zoom, { 0 } }, \
{ MODKEY, XK_m, togglemax, { 0 } }, \ { MODKEY, XK_m, togglemax, { 0 } }, \
{ MODKEY, XK_g, growcol, { .i = 20 } }, \
{ MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \ { MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
{ MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \ { MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \
{ MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \ { MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \


+ 1
- 0
config.default.h View File

@ -29,6 +29,7 @@ static Key key[] = { \
{ MODKEY|ShiftMask, XK_Tab, focusprev, { 0 } }, \ { MODKEY|ShiftMask, XK_Tab, focusprev, { 0 } }, \
{ MODKEY, XK_Return, zoom, { 0 } }, \ { MODKEY, XK_Return, zoom, { 0 } }, \
{ MODKEY, XK_m, togglemax, { 0 } }, \ { MODKEY, XK_m, togglemax, { 0 } }, \
{ MODKEY, XK_g, growcol, { .i = 20 } }, \
{ MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \ { MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
{ MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \ { MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \
{ MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \ { MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \


+ 6
- 0
dwm.1 View File

@ -90,6 +90,12 @@ mode only).
Maximize current Maximize current
.BR window . .BR window .
.TP .TP
.B Mod1-g
Grow current
.BR column
.RB ( tiling
mode only).
.TP
.B Mod1-Shift-[1..n] .B Mod1-Shift-[1..n]
Apply Apply
.B nth tag .B nth tag


+ 1
- 0
dwm.h View File

@ -131,6 +131,7 @@ extern void dofloat(Arg *arg);
extern void dotile(Arg *arg); extern void dotile(Arg *arg);
extern void focusnext(Arg *arg); extern void focusnext(Arg *arg);
extern void focusprev(Arg *arg); extern void focusprev(Arg *arg);
extern void growcol(Arg *arg);
extern Bool isvisible(Client *c); extern Bool isvisible(Client *c);
extern void restack(); extern void restack();
extern void togglemode(Arg *arg); extern void togglemode(Arg *arg);


+ 18
- 0
view.c View File

@ -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 Bool
isvisible(Client *c) isvisible(Client *c)
{ {


Loading…
Cancel
Save