Browse Source

applied sanders somepatches.patch

config
Anselm R. Garbe 18 years ago
parent
commit
2dd5212a79
4 changed files with 16 additions and 8 deletions
  1. +1
    -1
      config.default.h
  2. +5
    -4
      draw.c
  3. +6
    -1
      dwm.1
  4. +4
    -2
      event.c

+ 1
- 1
config.default.h View File

@ -55,7 +55,7 @@ static Key key[] = { \
}; };
/* Query class:instance:title for regex matching info with following command: /* Query class:instance:title for regex matching info with following command:
* xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/{ printf("%s\n",$2) }' */
* xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */
#define RULES \ #define RULES \
static Rule rule[] = { \ static Rule rule[] = { \
/* class:instance:title regex tags regex isfloat */ \ /* class:instance:title regex tags regex isfloat */ \


+ 5
- 4
draw.c View File

@ -97,9 +97,7 @@ drawstatus()
int i, x; int i, x;
dc.x = dc.y = 0; dc.x = dc.y = 0;
dc.w = bw;
drawtext(NULL, dc.status, False);
for(i = 0; i < ntags; i++) { for(i = 0; i < ntags; i++) {
dc.w = textw(tags[i]); dc.w = textw(tags[i]);
if(seltag[i]) if(seltag[i])
@ -121,9 +119,12 @@ drawstatus()
} }
drawtext(stext, dc.status, False); drawtext(stext, dc.status, False);
if(sel && ((dc.w = dc.x - x) > bh)) {
if((dc.w = dc.x - x) > bh) {
dc.x = x; dc.x = x;
drawtext(sel->name, dc.sel, False);
if(sel)
drawtext(sel->name, dc.sel, False);
else
drawtext(NULL, dc.norm, False);
} }
XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
XSync(dpy, False); XSync(dpy, False);


+ 6
- 1
dwm.1 View File

@ -40,7 +40,12 @@ is read and displayed in the status text area.
.TP .TP
.B Button1 .B Button1
click on a tag label views all windows with that click on a tag label views all windows with that
.BR tag .
.BR tag ,
click on the mode label toggles between
.B tiled
and
.B floating
mode.
.TP .TP
.B Button3 .B Button3
click on a tag label adds/removes all windows with that click on a tag label adds/removes all windows with that


+ 4
- 2
event.c View File

@ -116,8 +116,10 @@ buttonpress(XEvent *e)
return; return;
} }
} }
if(ev->x < x + bmw)
togglemode(NULL);
if(ev->x < x + bmw) {
if(ev->button == Button1)
togglemode(NULL);
}
} }
else if((c = getclient(ev->window))) { else if((c = getclient(ev->window))) {
focus(c); focus(c);


Loading…
Cancel
Save