about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* fixed a bug in dmenu callarg@10ksloc.org2006-08-042-6/+3
|
* using execl now, argv changed, using cmd and const char defs directly in the ↵arg@10ksloc.org2006-08-044-18/+18
| | | | KEYS struct
* added dmenu to dwm.htmlarg@10ksloc.org2006-08-041-0/+4
|
* small stylistic fixarg@10ksloc.org2006-08-041-1/+2
|
* removed CONFIGarg@10ksloc.org2006-08-031-3/+2
|
* make config.h not a time dependencearg@10ksloc.org2006-08-031-1/+1
|
* removed rm config.h from cleanarg@10ksloc.org2006-08-031-1/+1
|
* added gmake compliancearg@10ksloc.org2006-08-031-2/+2
|
* s/tag2/two/garg@10ksloc.org2006-08-032-4/+4
|
* applied Jukka's diffarg@10ksloc.org2006-08-031-4/+5
|
* applied Sanders Makefile patcharg@10ksloc.org2006-08-031-26/+20
|
* stylistic chnagearg@10ksloc.org2006-08-032-4/+4
|
* removed TLast tag enum, now tags is simple defined as char *[] array, the ↵arg@10ksloc.org2006-08-038-71/+66
| | | | rest is calculated correctly, rules take an int array for the tags
* hotfix of settagsarg@10ksloc.org2006-08-031-2/+1
|
* using SRC instead of *.carg@10ksloc.org2006-08-031-1/+1
|
* changed the files included in make distarg@10ksloc.org2006-08-031-1/+2
|
* applied Sanders doc changes, added a PHONY line and changed the output of ↵arg@10ksloc.org2006-08-033-17/+22
| | | | config.h creation somewhat
* changed Client->tags and Rule->tags to be Bool (I'll also try to remove the ↵arg@10ksloc.org2006-08-036-17/+18
| | | | TLast enum)
* implemented the idea presented by Sander for dwm targetarg@10ksloc.org2006-08-022-3/+5
|
* changing MASTERW value from 52 to 60 (in both, default and arg), I feel this ↵arg@10ksloc.org2006-08-023-3/+3
| | | | is better now
* fixed a type in README, and patched config.mkarg@10ksloc.org2006-08-022-2/+2
|
* updated dwm.htmlarg@10ksloc.org2006-08-021-3/+3
|
* Added tag 0.6 for changeset c11f86db4550cac5d0a648a3fe4d6d3b9a4fcf7earg@10ksloc.org2006-08-021-0/+1
|
* removed config.h (stupid hg) 0.6arg@10ksloc.org2006-08-021-62/+0
|
* removed the CONFIG variable from config.mk, renamed config.h into ↵arg@10ksloc.org2006-08-024-11/+66
| | | | config.default.h, after first clone/extract one needs to copy config.default.h to config.h, that is easier than always heavy typing make CONFIG=blafasel
* added Acroread.* and MPlayer.* to config.arg.h rulesarg@10ksloc.org2006-08-021-0/+2
|
* made fullscreen apps working fine in floating mode (there is no sane way to ↵arg@10ksloc.org2006-08-029-79/+92
| | | | make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
* new stuffarg@10ksloc.org2006-08-022-20/+23
|
* dwm is now exit, if stdin is closed due broken pipearg@10ksloc.org2006-08-021-8/+5
|
* implemented focus on enterwindow on titlebarsarg@10ksloc.org2006-08-022-2/+2
|
* applied Sanders patches (numlock2)arg@10ksloc.org2006-08-025-26/+40
|
* reverting to old resize policyarg@10ksloc.org2006-08-022-21/+32
|
* new resize stuff (using XConfigureWindow instead of XSendEvent)arg@10ksloc.org2006-08-022-32/+21
|
* renamed WM_PROTOCOL_DELWIN into PROTODELWINarg@10ksloc.org2006-08-013-3/+3
|
* renamed ARRANGE into DEFMODEarg@10ksloc.org2006-08-013-4/+3
|
* small fixes to dwm.htmlarg@10ksloc.org2006-08-011-6/+6
|
* simplified READMEarg@10ksloc.org2006-08-011-4/+1
|
* removed 1 missing LOCarg@10ksloc.org2006-08-011-1/+0
|
* removed 5LOCarg@10ksloc.org2006-08-012-15/+10
|
* removed artefacts of single-linked list (thanx to Jukka, I must have been mad)arg@10ksloc.org2006-08-012-9/+4
|
* cleaned config.*h to prevent some confusionarg@10ksloc.org2006-08-013-6/+5
|
* saved 2LOCarg@10ksloc.org2006-08-011-4/+2
|
* uppercasing all define'd values (uppercase-prefixed should only be enum ↵arg@10ksloc.org2006-08-014-16/+16
| | | | field qualifiers)
* fixed config.h filesarg@10ksloc.org2006-08-012-4/+2
|
* centralized/externalized configuration to config.harg@10ksloc.org2006-08-019-107/+172
|
* applied Cedric's NumLock patcharg@10ksloc.org2006-08-011-1/+17
|
* applied Jukkas prev/next patch with XK_{h,l}arg@10ksloc.org2006-08-013-0/+18
|
* applied Sanders patchesarg@10ksloc.org2006-08-018-58/+42
|
* committed a patch which fixes the hints of Jukkaarg@10ksloc.org2006-08-014-40/+14
|
* updated htmlarg@10ksloc.org2006-07-211-1/+1
|
"p">, GrabModeAsync, GrabModeAsync, None, cursor[CurResize], CurrentTime) != GrabSuccess) return; XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h); for(;;) { XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); switch(ev.type) { default: break; case Expose: handler[Expose](&ev); break; case MotionNotify: XSync(dpy, False); c->w = abs(ocx - ev.xmotion.x); c->h = abs(ocy - ev.xmotion.y); c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w; c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h; if(ocx <= ev.xmotion.x) sticky = (ocy <= ev.xmotion.y) ? TopLeft : BotLeft; else sticky = (ocy <= ev.xmotion.y) ? TopRight : BotRight; resize(c, True, sticky); break; case ButtonRelease: XUngrabPointer(dpy, CurrentTime); return; } } } static void buttonpress(XEvent *e) { int x; Arg a; Client *c; XButtonPressedEvent *ev = &e->xbutton; if(barwin == ev->window) { switch(ev->button) { default: x = 0; for(a.i = 0; a.i < ntags; a.i++) { x += textw(tags[a.i]); if(ev->x < x) { view(&a); break; } } break; case Button4: viewnext(&a); break; case Button5: viewprev(&a); break; } } else if((c = getclient(ev->window))) { focus(c); switch(ev->button) { default: break; case Button1: if(!c->ismax && (arrange == dofloat || c->isfloat)) { higher(c); movemouse(c); } break; case Button2: lower(c); break; case Button3: if(!c->ismax && (arrange == dofloat || c->isfloat)) { higher(c); resizemouse(c); } break; } } } static void configurerequest(XEvent *e) { Client *c; XConfigureRequestEvent *ev = &e->xconfigurerequest; XEvent synev; XWindowChanges wc; unsigned long newmask; if((c = getclient(ev->window))) { gravitate(c, True); if(ev->value_mask & CWX) c->x = ev->x; if(ev->value_mask & CWY) c->y = ev->y; if(ev->value_mask & CWWidth) c->w = ev->width; if(ev->value_mask & CWHeight) c->h = ev->height; if(ev->value_mask & CWBorderWidth) c->border = ev->border_width; gravitate(c, False); wc.x = c->x; wc.y = c->y; wc.width = c->w; wc.height = c->h; newmask = ev->value_mask & (~(CWSibling | CWStackMode | CWBorderWidth)); if(newmask) XConfigureWindow(dpy, c->win, newmask, &wc); else { synev.type = ConfigureNotify; synev.xconfigure.display = dpy; synev.xconfigure.event = c->win; synev.xconfigure.window = c->win; synev.xconfigure.x = c->x; synev.xconfigure.y = c->y; synev.xconfigure.width = c->w; synev.xconfigure.height = c->h; synev.xconfigure.border_width = c->border; synev.xconfigure.above = None; /* Send synthetic ConfigureNotify */ XSendEvent(dpy, c->win, True, NoEventMask, &synev); } XSync(dpy, False); if(c->isfloat) resize(c, False, TopLeft); else arrange(NULL); } else { wc.x = ev->x; wc.y = ev->y; wc.width = ev->width; wc.height = ev->height; wc.border_width = ev->border_width; wc.sibling = ev->above; wc.stack_mode = ev->detail; XConfigureWindow(dpy, ev->window, ev->value_mask, &wc); XSync(dpy, False); } } static void destroynotify(XEvent *e) { Client *c; XDestroyWindowEvent *ev = &e->xdestroywindow; if((c = getclient(ev->window))) unmanage(c); } static void enternotify(XEvent *e) { Client *c; XCrossingEvent *ev = &e->xcrossing; if(ev->detail == NotifyInferior) return; if((c = getclient(ev->window)) || (c = getctitle(ev->window))) focus(c); else if(ev->window == root) issel = True; } static void expose(XEvent *e) { Client *c; XExposeEvent *ev = &e->xexpose; if(ev->count == 0) { if(barwin == ev->window) drawstatus(); else if((c = getctitle(ev->window))) drawtitle(c); } } static void keypress(XEvent *e) { static unsigned int len = sizeof(key) / sizeof(key[0]); unsigned int i; KeySym keysym; XKeyEvent *ev = &e->xkey; keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); for(i = 0; i < len; i++) if(keysym == key[i].keysym && CLEANMASK(key[i].mod) == CLEANMASK(ev->state)) { if(key[i].func) key[i].func(&key[i].arg); return; } } static void leavenotify(XEvent *e) { XCrossingEvent *ev = &e->xcrossing; if((ev->window == root) && !ev->same_screen) issel = True; } static void maprequest(XEvent *e) { static XWindowAttributes wa; XMapRequestEvent *ev = &e->xmaprequest; if(!XGetWindowAttributes(dpy, ev->window, &wa)) return; if(wa.override_redirect) { XSelectInput(dpy, ev->window, (StructureNotifyMask | PropertyChangeMask)); return; } if(!getclient(ev->window)) manage(ev->window, &wa); } static void propertynotify(XEvent *e) { Client *c; Window trans; XPropertyEvent *ev = &e->xproperty; if(ev->state == PropertyDelete) return; /* ignore */ if((c = getclient(ev->window))) { if(ev->atom == wmatom[WMProtocols]) { c->proto = getproto(c->win); return; } switch (ev->atom) { default: break; case XA_WM_TRANSIENT_FOR: XGetTransientForHint(dpy, c->win, &trans); if(!c->isfloat && (c->isfloat = (trans != 0))) arrange(NULL); break; case XA_WM_NORMAL_HINTS: setsize(c); break; } if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) { settitle(c); drawtitle(c); } } } static void unmapnotify(XEvent *e) { Client *c; XUnmapEvent *ev = &e->xunmap; if((c = getclient(ev->window))) unmanage(c); } /* extern */ void (*handler[LASTEvent]) (XEvent *) = { [ButtonPress] = buttonpress, [ConfigureRequest] = configurerequest, [DestroyNotify] = destroynotify, [EnterNotify] = enternotify, [LeaveNotify] = leavenotify, [Expose] = expose, [KeyPress] = keypress, [MapRequest] = maprequest, [PropertyNotify] = propertynotify, [UnmapNotify] = unmapnotify }; void grabkeys() { static unsigned int len = sizeof(key) / sizeof(key[0]); unsigned int i; KeyCode code; for(i = 0; i < len; i++) { code = XKeysymToKeycode(dpy, key[i].keysym); XGrabKey(dpy, code, key[i].mod, root, True, GrabModeAsync, GrabModeAsync); XGrabKey(dpy, code, key[i].mod | LockMask, root, True, GrabModeAsync, GrabModeAsync); XGrabKey(dpy, code, key[i].mod | NUMLOCKMASK, root, True, GrabModeAsync, GrabModeAsync); XGrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root, True, GrabModeAsync, GrabModeAsync); } }