all repos — dwm @ d37dfa1bedbfadb5d39aa1937e77d4fd44319018

my dwm build

changed symbols for float/tiled mode, added mouse-driven mode toggle to buttonpress()
Anselm R. Garbe arg@10kloc.org
Fri, 25 Aug 2006 15:06:38 +0200
commit

d37dfa1bedbfadb5d39aa1937e77d4fd44319018

parent

9f35cc52fe27f694ce146356e6c71267ecd19217

2 files changed, 13 insertions(+), 11 deletions(-)

jump to
M draw.cdraw.c

@@ -94,7 +94,7 @@

void drawstatus() { - static const char *mode[] = { "~", "|" }; + static const char *mode[] = { "><", "|=" }; int i, x; dc.x = dc.y = 0;
M event.cevent.c

@@ -106,16 +106,18 @@ XButtonPressedEvent *ev = &e->xbutton;

if(barwin == ev->window) { if(ev->x < modew) - return; - x = modew; - for(a.i = 0; a.i < ntags; a.i++) { - x += textw(tags[a.i]); - if(ev->x < x) { - if(ev->button == Button1) - view(&a); - else if(ev->button == Button3) - toggleview(&a); - return; + togglemode(NULL); + else { + x = modew; + for(a.i = 0; a.i < ntags; a.i++) { + x += textw(tags[a.i]); + if(ev->x < x) { + if(ev->button == Button1) + view(&a); + else if(ev->button == Button3) + toggleview(&a); + return; + } } } }