summary refs log tree commit diff stats
path: root/web
Commit message (Collapse)AuthorAgeFilesLines
* tables work in 'const' sections; echo supports 'nil' strings; minor cleanupsAraq2015-02-091-0/+9
|
* fixes #2073Araq2015-02-081-1/+2
|
* fixes #2073; language spec change: arrow like operators are not right ↵Araq2015-02-081-0/+1
| | | | associative anymore
* better documentation for 'finished' for first class iteratorsAraq2015-01-271-0/+3
|
* nimsuggest: first versionAraq2015-01-271-0/+2
|
* Logging module is now thread-safe.Dominik Picheta2015-01-251-1/+3
|
* minor website improvementsAraq2015-01-231-0/+10
|
* revert to old behaviour: tuple field names are not ignored anymore; fixes #1920Araq2015-01-181-0/+3
|
* Revert "Documented faster way to bootstrap-build Nim"Varriount2015-01-171-2/+6
|
* Merge pull request #1951 from noway421/bootstrap-install-docs-fixVarriount2015-01-171-6/+2
|\ | | | | Documented faster way to bootstrap-build Nim
| * updated web/download.txtWay, No2015-01-141-6/+2
| |
* | GitHub link fixes: nim-code -> nim-langdef2015-01-152-4/+4
| |
* | koch doesn't use compiler/nversion (makes no sense); updated twitter linkAraq2015-01-131-1/+1
|/
* 'discard' can be used instead of 'nil' for empty case object branchesAraq2015-01-121-0/+20
|
* s/nimrod/nim/g; s/babel/nimble/gFlaviu Tamas2015-01-092-5/+5
|
* Add TextMate bundle linkMichael Sheets2015-01-041-0/+1
|
* fix a couple of typos, grammar, and removal of whitespaceJoseph Poirier2015-01-031-17/+17
|
* website updates; Source links now workAraq2014-12-302-8/+8
|
* website: better formatingAraq2014-12-301-3/+3
|
* Merge branch 'devel' of https://github.com/Araq/Nim into develAraq2014-12-291-2/+1
|\
| * Fix typo in news.Dominik Picheta2014-12-291-2/+1
| |
* | minor website updateAraq2014-12-291-3/+3
|/
* release of 0.10.2Araq2014-12-294-204/+205
|
* fixes #1708, fixes #871Araq2014-12-281-7/+11
|
* Improved release news entry.Dominik Picheta2014-12-261-8/+61
|
* Improved 0.10.2 changelog.Dominik Picheta2014-12-261-2/+36
|
* Fixes official package detection in babelpkglist.Dominik Picheta2014-12-261-2/+3
|
* website improvementsAraq2014-12-265-10/+11
|
* fixes #1120Araq2014-12-251-2/+5
|
* Merge branch 'devel' of https://github.com/Araq/Nimrod into develAraq2014-12-232-2/+502
|\
| * Merge pull request #1767 from sanxiyn/patch-1Dominik Picheta2014-12-221-2/+2
| |\ | | | | | | Update installation instruction
| | * Update installation instructionSeo Sanghyeon2014-12-221-2/+2
| | |
| * | Logo in SVG format.Maurizio Tomasi2014-12-221-0/+500
| |/ | | | | | | | | | | | | This has been created using Inkscape, starting from a .png file created by @PhilipWitte (see http://reign-studios.net/philipwitte/nimrod/new-symbols.png, the third icon from left in the top row).
* / website updatedAraq2014-12-232-9/+20
|/
* implemented 'koch pdf'Araq2014-12-191-1/+1
|
* more code snippets for the websiteAraq2014-12-142-2/+18
|
* Merge branch 'devel' of https://github.com/Araq/Nimrod into develAraq2014-12-131-2/+3
|\
| * Fix font colorSimon Krauter2014-12-131-2/+3
| |
* | added 'website' option to koch for convenienceAraq2014-12-132-5/+5
|/
* website improvementsAraq2014-12-126-5/+23
|
* website slightly improvedAraq2014-12-113-6/+4
|
* fixes #1689Araq2014-12-101-0/+7
|
* fixed typosAraq2014-12-101-4/+4
|
* further website improvementsAraq2014-12-101-3/+5
|
* destuctors are experimental; 'func' is now a keywordAraq2014-12-101-0/+3
|
* new websiteAraq2014-12-1027-422/+878
|
* implemented 'experimental' switchAraq2014-12-051-0/+5
|
* implements 'defer'Araq2014-12-041-0/+1
|
* implemented procCall builtinAraq2014-11-281-0/+2
|
* fixes #619Araq2014-11-152-2/+2
|
p">) manage(wins[i], &wa); } } if(wins) XFree(wins); } static void setup() { int i, j; unsigned int mask; Window w; XModifierKeymap *modmap; XSetWindowAttributes wa; /* init atoms */ wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32, PropModeReplace, (unsigned char *) netatom, NetLast); /* init cursors */ cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr); cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing); cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); modmap = XGetModifierMapping(dpy); for (i = 0; i < 8; i++) { for (j = 0; j < modmap->max_keypermod; j++) { if(modmap->modifiermap[i * modmap->max_keypermod + j] == XKeysymToKeycode(dpy, XK_Num_Lock)) numlockmask = (1 << i); } } XFree(modmap); wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask | EnterWindowMask | LeaveWindowMask; wa.cursor = cursor[CurNormal]; XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); grabkeys(); initrregs(); for(ntags = 0; tags[ntags]; ntags++); seltag = emallocz(sizeof(Bool) * ntags); seltag[0] = True; /* style */ dc.norm[ColBG] = getcolor(NORMBGCOLOR); dc.norm[ColFG] = getcolor(NORMFGCOLOR); dc.sel[ColBG] = getcolor(SELBGCOLOR); dc.sel[ColFG] = getcolor(SELFGCOLOR); dc.status[ColBG] = getcolor(STATUSBGCOLOR); dc.status[ColFG] = getcolor(STATUSFGCOLOR); setfont(FONT); bmw = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL); sx = sy = 0; sw = DisplayWidth(dpy, screen); sh = DisplayHeight(dpy, screen); mw = (sw * MASTERW) / 100; bx = by = 0; bw = sw; dc.h = bh = dc.font.height + 2; wa.override_redirect = 1; wa.background_pixmap = ParentRelative; wa.event_mask = ButtonPressMask | ExposureMask; barwin = XCreateWindow(dpy, root, bx, by, bw, bh, 0, DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); XDefineCursor(dpy, barwin, cursor[CurNormal]); XMapRaised(dpy, barwin); dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen)); dc.gc = XCreateGC(dpy, root, 0, 0); XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); strcpy(stext, "dwm-"VERSION); } /* * Startup Error handler to check if another window manager * is already running. */ static int xerrorstart(Display *dsply, XErrorEvent *ee) { otherwm = True; return -1; } /* extern */ int getproto(Window w) { int i, format, protos, status; unsigned long extra, res; Atom *protocols, real; protos = 0; status = XGetWindowProperty(dpy, w, wmatom[WMProtocols], 0L, 20L, False, XA_ATOM, &real, &format, &res, &extra, (unsigned char **)&protocols); if(status != Success || protocols == 0) return protos; for(i = 0; i < res; i++) if(protocols[i] == wmatom[WMDelete]) protos |= PROTODELWIN; free(protocols); return protos; } void sendevent(Window w, Atom a, long value) { XEvent e; e.type = ClientMessage; e.xclient.window = w; e.xclient.message_type = a; e.xclient.format = 32; e.xclient.data.l[0] = value; e.xclient.data.l[1] = CurrentTime; XSendEvent(dpy, w, False, NoEventMask, &e); XSync(dpy, False); } void quit(Arg *arg) { readin = running = False; } /* * There's no way to check accesses to destroyed windows, thus those cases are * ignored (especially on UnmapNotify's). Other types of errors call Xlibs * default error handler, which calls exit(). */ int xerror(Display *dpy, XErrorEvent *ee) { if(ee->error_code == BadWindow || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch) || (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable) || (ee->request_code == X_PolyFillRectangle && ee->error_code == BadDrawable) || (ee->request_code == X_PolySegment && ee->error_code == BadDrawable) || (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch) || (ee->request_code == X_GrabKey && ee->error_code == BadAccess)) return 0; fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n", ee->request_code, ee->error_code); return xerrorxlib(dpy, ee); /* may call exit() */ } int main(int argc, char *argv[]) { int r, xfd; fd_set rd; if(argc == 2 && !strncmp("-v", argv[1], 3)) { fputs("dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout); exit(EXIT_SUCCESS); } else if(argc != 1) eprint("usage: dwm [-v]\n"); dpy = XOpenDisplay(0); if(!dpy) eprint("dwm: cannot open display\n"); xfd = ConnectionNumber(dpy); screen = DefaultScreen(dpy); root = RootWindow(dpy, screen); otherwm = False; XSetErrorHandler(xerrorstart); /* this causes an error if some other window manager is running */ XSelectInput(dpy, root, SubstructureRedirectMask); XSync(dpy, False); if(otherwm) eprint("dwm: another window manager is already running\n"); XSync(dpy, False); XSetErrorHandler(NULL); xerrorxlib = XSetErrorHandler(xerror); XSync(dpy, False); setup(); drawstatus(); scan(); /* main event loop, also reads status text from stdin */ XSync(dpy, False); procevent(); readin = True; while(running) { FD_ZERO(&rd); if(readin) FD_SET(STDIN_FILENO, &rd); FD_SET(xfd, &rd); r = select(xfd + 1, &rd, NULL, NULL, NULL); if((r == -1) && (errno == EINTR)) continue; if(r > 0) { if(readin && FD_ISSET(STDIN_FILENO, &rd)) { readin = NULL != fgets(stext, sizeof(stext), stdin); if(readin) stext[strlen(stext) - 1] = 0; else strcpy(stext, "broken pipe"); drawstatus(); } } else if(r < 0) eprint("select failed\n"); procevent(); } cleanup(); XCloseDisplay(dpy); return 0; }