diff options
| author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-14 10:34:07 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-14 10:34:07 +0200 |
| commit | 6458d72572a30d2cc4af3385755033b2cca93057 (patch) | |
| tree | 158be70ab7a84b729a66f0532c08aa7b336db217 | |
| parent | implemented bar for dwm (I miss status text), I plan that status text is read... (diff) | |
| download | dwm-6458d72572a30d2cc4af3385755033b2cca93057.tar.gz dwm-6458d72572a30d2cc4af3385755033b2cca93057.zip | |
made barclick to select the specific tag
| -rw-r--r-- | bar.c | 14 | ||||
| -rw-r--r-- | dwm.1 | 3 | ||||
| -rw-r--r-- | dwm.h | 1 | ||||
| -rw-r--r-- | dwm.html | 16 | ||||
| -rw-r--r-- | event.c | 4 | ||||
| -rw-r--r-- | main.c | 2 |
6 files changed, 36 insertions, 4 deletions
| @@ -6,6 +6,20 @@ | |||
| 6 | #include "dwm.h" | 6 | #include "dwm.h" |
| 7 | 7 | ||
| 8 | void | 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 | draw_bar() | 23 | draw_bar() |
| 10 | { | 24 | { |
| 11 | int i; | 25 | int i; |
| @@ -12,6 +12,9 @@ is a dynamic window manager for X11. | |||
| 12 | .TP | 12 | .TP |
| 13 | .B \-v | 13 | .B \-v |
| 14 | prints version information to stdout, then exits. | 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 | .SS Default Key Bindings | 18 | .SS Default Key Bindings |
| 16 | .TP 16 | 19 | .TP 16 |
| 17 | .I Key | 20 | .I Key |
| @@ -103,6 +103,7 @@ extern Client *clients, *sel; | |||
| 103 | 103 | ||
| 104 | /* bar.c */ | 104 | /* bar.c */ |
| 105 | extern void draw_bar(); | 105 | extern void draw_bar(); |
| 106 | extern void barclick(XButtonPressedEvent *e); | ||
| 106 | 107 | ||
| 107 | /* client.c */ | 108 | /* client.c */ |
| 108 | extern void manage(Window w, XWindowAttributes *wa); | 109 | extern void manage(Window w, XWindowAttributes *wa); |
| @@ -39,7 +39,7 @@ | |||
| 39 | </p> | 39 | </p> |
| 40 | <ul> | 40 | <ul> |
| 41 | <li> | 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 | no shell-based configuration and remote control and comes without | 43 | no shell-based configuration and remote control and comes without |
| 44 | any additional tools like printing the selection or warping the | 44 | any additional tools like printing the selection or warping the |
| 45 | mouse. | 45 | mouse. |
| @@ -69,6 +69,11 @@ | |||
| 69 | clients. | 69 | clients. |
| 70 | </li> | 70 | </li> |
| 71 | <li> | 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 | garbeam <b>does not</b> want any feedback to dwm. If you ask for support, | 77 | garbeam <b>does not</b> want any feedback to dwm. If you ask for support, |
| 73 | feature requests, or if you report bugs, they will be <b>ignored</b> | 78 | feature requests, or if you report bugs, they will be <b>ignored</b> |
| 74 | with a high chance. dwm is only intended to fit garbeams needs. | 79 | with a high chance. dwm is only intended to fit garbeams needs. |
| @@ -87,6 +92,13 @@ | |||
| 87 | <p> | 92 | <p> |
| 88 | <code>hg clone http://wmii.de/cgi-bin/hgwebdir.cgi/dwm</code> | 93 | <code>hg clone http://wmii.de/cgi-bin/hgwebdir.cgi/dwm</code> |
| 89 | </p> | 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 | </body> | 103 | </body> |
| 92 | </html> | 104 | </html> |
| @@ -50,7 +50,9 @@ buttonpress(XEvent *e) | |||
| 50 | XButtonPressedEvent *ev = &e->xbutton; | 50 | XButtonPressedEvent *ev = &e->xbutton; |
| 51 | Client *c; | 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 | craise(c); | 56 | craise(c); |
| 55 | switch(ev->button) { | 57 | switch(ev->button) { |
| 56 | default: | 58 | default: |
| @@ -252,7 +252,7 @@ main(int argc, char *argv[]) | |||
| 252 | 252 | ||
| 253 | wa.override_redirect = 1; | 253 | wa.override_redirect = 1; |
| 254 | wa.background_pixmap = ParentRelative; | 254 | wa.background_pixmap = ParentRelative; |
| 255 | wa.event_mask = ExposureMask; | 255 | wa.event_mask = ButtonPressMask | ExposureMask; |
| 256 | 256 | ||
| 257 | bx = by = 0; | 257 | bx = by = 0; |
| 258 | bw = sw; | 258 | bw = sw; |
