applied Gottox patch to simplify the resizing of col, instead of resizing the current area, it only resizes the master area in the future (seems more predictable)
2cce4b95
3 file(s) · +5 −20
| 1 | 1 | # dwm version |
|
| 2 | - | VERSION = 2.0 |
|
| 2 | + | VERSION = 2.1 |
|
| 3 | 3 | ||
| 4 | 4 | # Customize below to fit your system |
|
| 5 | 5 |
| 63 | 63 | Zooms/cycles current window to/from master area (tiling mode), toggles maximization current window (floating mode). |
|
| 64 | 64 | .TP |
|
| 65 | 65 | .B Mod1-g |
|
| 66 | - | Grow current area (tiling mode only). |
|
| 66 | + | Grow master area (tiling mode only). |
|
| 67 | 67 | .TP |
|
| 68 | 68 | .B Mod1-s |
|
| 69 | - | Shrink current area (tiling mode only). |
|
| 69 | + | Shrink master area (tiling mode only). |
|
| 70 | 70 | .TP |
|
| 71 | 71 | .B Mod1-Shift-[1..n] |
|
| 72 | 72 | Apply |
| 196 | 196 | ||
| 197 | 197 | void |
|
| 198 | 198 | resizecol(Arg *arg) { |
|
| 199 | - | unsigned int n; |
|
| 200 | - | Client *c; |
|
| 201 | - | ||
| 202 | - | for(n = 0, c = clients; c; c = c->next) |
|
| 203 | - | if(isvisible(c) && !c->isfloat) |
|
| 204 | - | n++; |
|
| 205 | - | if(!sel || sel->isfloat || n < 2 || (arrange == dofloat)) |
|
| 199 | + | if(master + arg->i > 950 || master + arg->i < 50) |
|
| 206 | 200 | return; |
|
| 207 | - | if(sel == getnext(clients)) { |
|
| 208 | - | if(master + arg->i > 950 || master + arg->i < 50) |
|
| 209 | - | return; |
|
| 210 | - | master += arg->i; |
|
| 211 | - | } |
|
| 212 | - | else { |
|
| 213 | - | if(master - arg->i > 950 || master - arg->i < 50) |
|
| 214 | - | return; |
|
| 215 | - | master -= arg->i; |
|
| 216 | - | } |
|
| 201 | + | master += arg->i; |
|
| 217 | 202 | arrange(); |
|
| 218 | 203 | } |
|
| 219 | 204 |