diff options
| -rw-r--r-- | config.default.h | 2 | ||||
| -rw-r--r-- | draw.c | 9 | ||||
| -rw-r--r-- | dwm.1 | 7 | ||||
| -rw-r--r-- | event.c | 6 |
4 files changed, 16 insertions, 8 deletions
diff --git a/config.default.h b/config.default.h index f28f5b8..6147c98 100644 --- a/config.default.h +++ b/config.default.h | |||
| @@ -55,7 +55,7 @@ static Key key[] = { \ | |||
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | /* Query class:instance:title for regex matching info with following command: | 57 | /* Query class:instance:title for regex matching info with following command: |
| 58 | * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/{ printf("%s\n",$2) }' */ | 58 | * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */ |
| 59 | #define RULES \ | 59 | #define RULES \ |
| 60 | static Rule rule[] = { \ | 60 | static Rule rule[] = { \ |
| 61 | /* class:instance:title regex tags regex isfloat */ \ | 61 | /* class:instance:title regex tags regex isfloat */ \ |
| @@ -97,9 +97,7 @@ drawstatus() | |||
| 97 | int i, x; | 97 | int i, x; |
| 98 | 98 | ||
| 99 | dc.x = dc.y = 0; | 99 | dc.x = dc.y = 0; |
| 100 | dc.w = bw; | ||
| 101 | 100 | ||
| 102 | drawtext(NULL, dc.status, False); | ||
| 103 | for(i = 0; i < ntags; i++) { | 101 | for(i = 0; i < ntags; i++) { |
| 104 | dc.w = textw(tags[i]); | 102 | dc.w = textw(tags[i]); |
| 105 | if(seltag[i]) | 103 | if(seltag[i]) |
| @@ -121,9 +119,12 @@ drawstatus() | |||
| 121 | } | 119 | } |
| 122 | drawtext(stext, dc.status, False); | 120 | drawtext(stext, dc.status, False); |
| 123 | 121 | ||
| 124 | if(sel && ((dc.w = dc.x - x) > bh)) { | 122 | if((dc.w = dc.x - x) > bh) { |
| 125 | dc.x = x; | 123 | dc.x = x; |
| 126 | drawtext(sel->name, dc.sel, False); | 124 | if(sel) |
| 125 | drawtext(sel->name, dc.sel, False); | ||
| 126 | else | ||
| 127 | drawtext(NULL, dc.norm, False); | ||
| 127 | } | 128 | } |
| 128 | XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); | 129 | XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); |
| 129 | XSync(dpy, False); | 130 | XSync(dpy, False); |
| @@ -40,7 +40,12 @@ is read and displayed in the status text area. | |||
| 40 | .TP | 40 | .TP |
| 41 | .B Button1 | 41 | .B Button1 |
| 42 | click on a tag label views all windows with that | 42 | click on a tag label views all windows with that |
| 43 | .BR tag . | 43 | .BR tag , |
| 44 | click on the mode label toggles between | ||
| 45 | .B tiled | ||
| 46 | and | ||
| 47 | .B floating | ||
| 48 | mode. | ||
| 44 | .TP | 49 | .TP |
| 45 | .B Button3 | 50 | .B Button3 |
| 46 | click on a tag label adds/removes all windows with that | 51 | click on a tag label adds/removes all windows with that |
| @@ -116,8 +116,10 @@ buttonpress(XEvent *e) | |||
| 116 | return; | 116 | return; |
| 117 | } | 117 | } |
| 118 | } | 118 | } |
| 119 | if(ev->x < x + bmw) | 119 | if(ev->x < x + bmw) { |
| 120 | togglemode(NULL); | 120 | if(ev->button == Button1) |
| 121 | togglemode(NULL); | ||
| 122 | } | ||
| 121 | } | 123 | } |
| 122 | else if((c = getclient(ev->window))) { | 124 | else if((c = getclient(ev->window))) { |
| 123 | focus(c); | 125 | focus(c); |
