Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
4b5b3d90af | |||
2cce4b95cd | |||
8e6eb52196 |
1
.hgtags
1
.hgtags
@ -18,3 +18,4 @@ ad3fa2d185426c51fd5deceae809770363f8d33c 1.6
|
||||
d5ad819f2a66a40fa75dd2e44429f3bfc884d07b 1.7.1
|
||||
c71952fa3c7ca848ec38a6923b5c6d0e18fff431 1.8
|
||||
a5567a0d30112822db2627a04a2e7aa3b6c38148 1.9
|
||||
12deea36603da407e3f32640048846a3bd74a9ec 2.0
|
||||
|
@ -33,8 +33,8 @@ static Key key[] = { \
|
||||
{ MODKEY, XK_j, focusnext, { 0 } }, \
|
||||
{ MODKEY, XK_k, focusprev, { 0 } }, \
|
||||
{ MODKEY, XK_Return, zoom, { 0 } }, \
|
||||
{ MODKEY, XK_g, resizecol, { .i = 15 } }, \
|
||||
{ MODKEY, XK_s, resizecol, { .i = -15 } }, \
|
||||
{ MODKEY, XK_g, resizemaster, { .i = 15 } }, \
|
||||
{ MODKEY, XK_s, resizemaster, { .i = -15 } }, \
|
||||
{ MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
|
||||
{ MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \
|
||||
{ MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \
|
||||
|
@ -28,8 +28,8 @@ static Key key[] = { \
|
||||
{ MODKEY, XK_Tab, focusnext, { 0 } }, \
|
||||
{ MODKEY|ShiftMask, XK_Tab, focusprev, { 0 } }, \
|
||||
{ MODKEY, XK_Return, zoom, { 0 } }, \
|
||||
{ MODKEY, XK_g, resizecol, { .i = 15 } }, \
|
||||
{ MODKEY, XK_s, resizecol, { .i = -15 } }, \
|
||||
{ MODKEY, XK_g, resizemaster, { .i = 15 } }, \
|
||||
{ MODKEY, XK_s, resizemaster, { .i = -15 } }, \
|
||||
{ MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
|
||||
{ MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \
|
||||
{ MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \
|
||||
|
@ -1,5 +1,5 @@
|
||||
# dwm version
|
||||
VERSION = 2.0
|
||||
VERSION = 2.1
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
|
4
dwm.1
4
dwm.1
@ -63,10 +63,10 @@ Focus previous window.
|
||||
Zooms/cycles current window to/from master area (tiling mode), toggles maximization current window (floating mode).
|
||||
.TP
|
||||
.B Mod1-g
|
||||
Grow current area (tiling mode only).
|
||||
Grow master area (tiling mode only).
|
||||
.TP
|
||||
.B Mod1-s
|
||||
Shrink current area (tiling mode only).
|
||||
Shrink master area (tiling mode only).
|
||||
.TP
|
||||
.B Mod1-Shift-[1..n]
|
||||
Apply
|
||||
|
2
dwm.h
2
dwm.h
@ -161,7 +161,7 @@ extern void dotile(void); /* arranges all windows tiled */
|
||||
extern void focusnext(Arg *arg); /* focuses next visible client, arg is ignored */
|
||||
extern void focusprev(Arg *arg); /* focuses previous visible client, arg is ignored */
|
||||
extern Bool isvisible(Client *c); /* returns True if client is visible */
|
||||
extern void resizecol(Arg *arg); /* resizes the master percent with arg's index value */
|
||||
extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */
|
||||
extern void restack(void); /* restores z layers of all clients */
|
||||
extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */
|
||||
extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */
|
||||
|
21
view.c
21
view.c
@ -195,25 +195,10 @@ isvisible(Client *c) {
|
||||
}
|
||||
|
||||
void
|
||||
resizecol(Arg *arg) {
|
||||
unsigned int n;
|
||||
Client *c;
|
||||
|
||||
for(n = 0, c = clients; c; c = c->next)
|
||||
if(isvisible(c) && !c->isfloat)
|
||||
n++;
|
||||
if(!sel || sel->isfloat || n < 2 || (arrange == dofloat))
|
||||
resizemaster(Arg *arg) {
|
||||
if(master + arg->i > 950 || master + arg->i < 50)
|
||||
return;
|
||||
if(sel == getnext(clients)) {
|
||||
if(master + arg->i > 950 || master + arg->i < 50)
|
||||
return;
|
||||
master += arg->i;
|
||||
}
|
||||
else {
|
||||
if(master - arg->i > 950 || master - arg->i < 50)
|
||||
return;
|
||||
master -= arg->i;
|
||||
}
|
||||
master += arg->i;
|
||||
arrange();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user