made barclick to select the specific tag
6458d725
6 file(s) · +36 −4
| 6 | 6 | #include "dwm.h" |
|
| 7 | 7 | ||
| 8 | 8 | void |
|
| 9 | + | barclick(XButtonPressedEvent *e) |
|
| 10 | + | { |
|
| 11 | + | int x = 0; |
|
| 12 | + | Arg a; |
|
| 13 | + | for(a.i = 0; a.i < TLast; a.i++) { |
|
| 14 | + | x += textw(tags[a.i]) + dc.font.height; |
|
| 15 | + | if(e->x < x) { |
|
| 16 | + | view(&a); |
|
| 17 | + | return; |
|
| 18 | + | } |
|
| 19 | + | } |
|
| 20 | + | } |
|
| 21 | + | ||
| 22 | + | void |
|
| 9 | 23 | draw_bar() |
|
| 10 | 24 | { |
|
| 11 | 25 | int i; |
| 12 | 12 | .TP |
|
| 13 | 13 | .B \-v |
|
| 14 | 14 | prints version information to stdout, then exits. |
|
| 15 | + | .SS Status text |
|
| 16 | + | .B dwm |
|
| 17 | + | reads from stdin to display status text if provided. |
|
| 15 | 18 | .SS Default Key Bindings |
|
| 16 | 19 | .TP 16 |
|
| 17 | 20 | .I Key |
| 103 | 103 | ||
| 104 | 104 | /* bar.c */ |
|
| 105 | 105 | extern void draw_bar(); |
|
| 106 | + | extern void barclick(XButtonPressedEvent *e); |
|
| 106 | 107 | ||
| 107 | 108 | /* client.c */ |
|
| 108 | 109 | extern void manage(Window w, XWindowAttributes *wa); |
| 39 | 39 | </p> |
|
| 40 | 40 | <ul> |
|
| 41 | 41 | <li> |
|
| 42 | - | dwm has no 9P support, no status bar, no menu, no editable tagbars, |
|
| 42 | + | dwm has no 9P support, no menu, no editable tagbars, |
|
| 43 | 43 | no shell-based configuration and remote control and comes without |
|
| 44 | 44 | any additional tools like printing the selection or warping the |
|
| 45 | 45 | mouse. |
|
| 69 | 69 | clients. |
|
| 70 | 70 | </li> |
|
| 71 | 71 | <li> |
|
| 72 | + | dwm reads from <b>stdin</b> to print arbirary status text (like the |
|
| 73 | + | date, load, battery charge). That's much simpler than larsremote, |
|
| 74 | + | wmiir and what not... |
|
| 75 | + | </li> |
|
| 76 | + | <li> |
|
| 72 | 77 | garbeam <b>does not</b> want any feedback to dwm. If you ask for support, |
|
| 73 | 78 | feature requests, or if you report bugs, they will be <b>ignored</b> |
|
| 74 | 79 | with a high chance. dwm is only intended to fit garbeams needs. |
|
| 87 | 92 | <p> |
|
| 88 | 93 | <code>hg clone http://wmii.de/cgi-bin/hgwebdir.cgi/dwm</code> |
|
| 89 | 94 | </p> |
|
| 90 | - | <p>--Anselm (20060713)</p> |
|
| 95 | + | <h3>Download</h3> |
|
| 96 | + | <p>There is no release yet.</p> |
|
| 97 | + | <h3>Miscellaneous</h3> |
|
| 98 | + | <p> |
|
| 99 | + | You can purchase this <a href="https://www.spreadshirt.net/shop.php?op=article&article_id=3298632&view=403">tricot</a> |
|
| 100 | + | if you like dwm and the dwm logo, which has been designed by garbeam. |
|
| 101 | + | </p> |
|
| 102 | + | <p><small>--Anselm (20060714)</small></p> |
|
| 91 | 103 | </body> |
|
| 92 | 104 | </html> |
|
| 50 | 50 | XButtonPressedEvent *ev = &e->xbutton; |
|
| 51 | 51 | Client *c; |
|
| 52 | 52 | ||
| 53 | - | if((c = getclient(ev->window))) { |
|
| 53 | + | if(barwin == ev->window) |
|
| 54 | + | barclick(ev); |
|
| 55 | + | else if((c = getclient(ev->window))) { |
|
| 54 | 56 | craise(c); |
|
| 55 | 57 | switch(ev->button) { |
|
| 56 | 58 | default: |
| 252 | 252 | ||
| 253 | 253 | wa.override_redirect = 1; |
|
| 254 | 254 | wa.background_pixmap = ParentRelative; |
|
| 255 | - | wa.event_mask = ExposureMask; |
|
| 255 | + | wa.event_mask = ButtonPressMask | ExposureMask; |
|
| 256 | 256 | ||
| 257 | 257 | bx = by = 0; |
|
| 258 | 258 | bw = sw; |