about summary refs log tree commit diff stats
path: root/dwm.html
Commit message (Collapse)AuthorAgeFilesLines
* adding forgetten whitespaceAnselm R.Garbe2006-08-151-1/+1
|
* added gmane archive to dwm.htmlAnselm R.Garbe2006-08-151-1/+1
|
* prepared dwm-0.9 0.9Anselm R.Garbe2006-08-151-2/+2
|
* added dwm faviconAnselm R.Garbe2006-08-101-0/+1
|
* applied grammar correction by ILFAnselm R.Garbe2006-08-101-1/+1
|
* prepared 0.8 0.8Anselm R.Garbe2006-08-101-2/+2
|
* updated htmlAnselm R.Garbe2006-08-101-2/+2
|
* applied Sanders tiny patchesAnselm R.Garbe2006-08-081-1/+1
|
* updated screenshot sectionarg@10ksloc.org2006-08-071-1/+2
|
* prepared dwm.html 0.7arg@10ksloc.org2006-08-071-3/+6
|
* fixed dmenu link (thx to deifl)arg@10ksloc.org2006-08-041-1/+1
|
* added dmenu to dwm.htmlarg@10ksloc.org2006-08-041-0/+4
|
* updated dwm.htmlarg@10ksloc.org2006-08-021-3/+3
|
* small fixes to dwm.htmlarg@10ksloc.org2006-08-011-6/+6
|
* updated htmlarg@10ksloc.org2006-07-211-1/+1
|
* prepared 0.4 0.4arg@10ksloc.org2006-07-201-1/+1
|
* yet another html patcharg@10ksloc.org2006-07-201-5/+5
|
* updated htmlarg@10ksloc.org2006-07-201-5/+5
|
* some changes in the html page 0.3arg@10ksloc.org2006-07-191-2/+2
|
* changed occurrences of wmii.de into 10kloc.org in dwm.html, because ↵Anselm R. Garbe2006-07-181-8/+8
| | | | 10kloc.org is already working
* added new stuffAnselm R. Garbe2006-07-171-9/+6
|
* updated htmlAnselm R. Garbe2006-07-171-9/+9
|
* patched dwmAnselm R. Garbe2006-07-171-28/+44
|
* updated html 0.2Anselm R. Garbe2006-07-171-1/+1
|
* ordered variables in structs and source files alphabeticallyAnselm R. Garbe2006-07-171-4/+3
|
* changing XFlush into XSyncAnselm R. Garbe2006-07-151-3/+3
|
* prep 0.1 0.1Anselm R. Garbe2006-07-141-1/+3
|
* implemented dwm reading status text from stdin Anselm R. Garbe2006-07-141-2/+2
|
* made barclick to select the specific tagAnselm R. Garbe2006-07-141-2/+14
|
* several fixesAnselm R. Garbe2006-07-131-3/+3
|
* added philosophy sectionAnselm R. Garbe2006-07-131-0/+11
|
* added xlock command (I need it regularly)Anselm R. Garbe2006-07-131-3/+3
|
* fixed grammar bug reported by John-GaltAnselm R. Garbe2006-07-131-1/+1
|
* last change to dwm.htmlAnselm R. Garbe2006-07-131-43/+47
|
* renamed/changedAnselm R. Garbe2006-07-131-1/+1
|
* added logo+descriptionAnselm R. Garbe2006-07-131-0/+77
n class="w"> ev; ocx = c->x; ocy = c->y; if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync, None, cursor[CurMove], CurrentTime) != GrabSuccess) return; XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui); for(;;) { XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev); switch (ev.type) { default: break; case Expose: handler[Expose](&ev); break; case MotionNotify: XSync(dpy, False); c->x = ocx + (ev.xmotion.x - x1); c->y = ocy + (ev.xmotion.y - y1); resize(c, False, TopLeft); break; case ButtonRelease: XUngrabPointer(dpy, CurrentTime); return; } } } static void resizemouse(Client *c) { int ocx, ocy; Corner sticky; XEvent ev; ocx = c->x; ocy = c->y; if(XGrabPointer(dpy, root, False, MOUSEMASK, 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 < TLast; 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; XWindowChanges wc; ev->value_mask &= ~CWSibling; 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 = 1; gravitate(c, False); resize(c, True, TopLeft); } wc.x = ev->x; wc.y = ev->y; wc.width = ev->width; wc.height = ev->height; wc.border_width = 1; wc.sibling = None; wc.stack_mode = Above; ev->value_mask &= ~CWStackMode; ev->value_mask |= CWBorderWidth; 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))) 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; ev->state &= valid_mask; keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); for(i = 0; i < len; i++) if((keysym == key[i].keysym) && ((key[i].mod & valid_mask) == 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); XUngrabKey(dpy, code, key[i].mod, root); XUngrabKey(dpy, code, key[i].mod | NUMLOCKMASK, root); XUngrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root); XGrabKey(dpy, code, key[i].mod, 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); } }