aewl

changeset 772:0c1e9952a278

naming change from dwm to aewl; cleanups
author meillo@marmaro.de
date Sat, 06 Dec 2008 11:15:51 +0100
parents 59a6f0ba5478
children d2e56ce18f5b
files aewl.c
diffstat 1 files changed, 19 insertions(+), 27 deletions(-) [+]
line diff
     1.1 --- a/aewl.c	Sat Dec 06 10:56:43 2008 +0100
     1.2 +++ b/aewl.c	Sat Dec 06 11:15:51 2008 +0100
     1.3 @@ -132,26 +132,25 @@
     1.4  void (*handler[LASTEvent])(XEvent *);	/* event handler */
     1.5  void (*arrange)(void);			/* arrange function, indicates mode  */
     1.6  Atom wmatom[WMLast], netatom[NetLast];
     1.7 -Bool running, selscreen, seltag;
     1.8 -Client *clients, *sel, *stack;		/* global client list and stack */
     1.9 +Bool running = True;
    1.10 +Bool selscreen = True;
    1.11 +Bool seltag;
    1.12 +Client* clients = NULL;		/* global client list */
    1.13 +Client* stack = NULL;		/* global client stack */
    1.14 +Client* sel = NULL;		/* selected client */
    1.15  Cursor cursor[CurLast];
    1.16 -DC dc;					/* global draw context */
    1.17 +DC dc = {0};					/* global draw context */
    1.18  Display *dpy;
    1.19  Window root, barwin;
    1.20  
    1.21 -Bool running = True;
    1.22 -Bool selscreen = True;
    1.23 -Client *clients = NULL;
    1.24 -Client *sel = NULL;
    1.25 -Client *stack = NULL;
    1.26 -DC dc = {0};
    1.27 -
    1.28  static int (*xerrorxlib)(Display *, XErrorEvent *);
    1.29  static Bool otherwm, readin;
    1.30  static unsigned int len = 0;
    1.31  
    1.32  
    1.33  RULES
    1.34 +KEYS
    1.35 +
    1.36  
    1.37  
    1.38  /* client.c */
    1.39 @@ -177,7 +176,7 @@
    1.40  
    1.41  /* main.c */
    1.42  void sendevent(Window w, Atom a, long value);	/* send synthetic event to w */
    1.43 -int xerror(Display *dsply, XErrorEvent *ee);	/* dwm's X error handler */
    1.44 +int xerror(Display *dsply, XErrorEvent *ee);	/* X error handler */
    1.45  
    1.46  /* tag.c */
    1.47  Client *getnext(Client *c);		/* returns next visible client */
    1.48 @@ -199,7 +198,7 @@
    1.49  void focusnext(void);		/* focuses next visible client  */
    1.50  void zoom(void);			/* zooms the focused client to master area */
    1.51  void killclient(void);		/* kill c nicely */
    1.52 -void quit(void);			/* quit dwm nicely */
    1.53 +void quit(void);			/* quit nicely */
    1.54  void togglemode(void);		/* toggles global arrange function (dotile/domax) */
    1.55  void togglefloat(void);		/* toggles focusesd client between floating/non-floating state */
    1.56  void incnmaster(void);		/* increments nmaster */
    1.57 @@ -509,7 +508,7 @@
    1.58  				close(ConnectionNumber(dpy));
    1.59  			setsid();
    1.60  			execl(shell, shell, "-c", cmd, (char *)NULL);
    1.61 -			fprintf(stderr, "dwm: execl '%s -c %s'", shell, cmd);
    1.62 +			fprintf(stderr, "aewl: execl '%s -c %s'", shell, cmd);
    1.63  			perror(" failed");
    1.64  		}
    1.65  		exit(0);
    1.66 @@ -592,17 +591,9 @@
    1.67  
    1.68  
    1.69  
    1.70 -
    1.71 -
    1.72 -
    1.73 -
    1.74 -
    1.75 -
    1.76  /* from event.c */
    1.77  /* static */
    1.78  
    1.79 -KEYS
    1.80 -
    1.81  
    1.82  
    1.83  static void
    1.84 @@ -1584,7 +1575,7 @@
    1.85  			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
    1.86  	XDefineCursor(dpy, barwin, cursor[CurNormal]);
    1.87  	XMapRaised(dpy, barwin);
    1.88 -	strcpy(stext, "dwm-"VERSION);
    1.89 +	strcpy(stext, "aewl-"VERSION);
    1.90  	/* windowarea */
    1.91  	wax = sx;
    1.92  	way = sy + bh;
    1.93 @@ -1644,7 +1635,7 @@
    1.94  	|| (ee->request_code == X_GrabKey && ee->error_code == BadAccess)
    1.95  	|| (ee->request_code == X_CopyArea && ee->error_code == BadDrawable))
    1.96  		return 0;
    1.97 -	fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n",
    1.98 +	fprintf(stderr, "aewl: fatal error: request code=%d, error code=%d\n",
    1.99  		ee->request_code, ee->error_code);
   1.100  	return xerrorxlib(dpy, ee); /* may call exit */
   1.101  }
   1.102 @@ -1656,15 +1647,16 @@
   1.103  	fd_set rd;
   1.104  
   1.105  	if(argc == 2 && !strncmp("-v", argv[1], 3)) {
   1.106 -		fputs("dwm-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n", stdout);
   1.107 +		fputs("aewl-"VERSION", Copyright 2008  markus schnalke <meillo@marmaro.de>\n", stdout);
   1.108 +		fputs("forked off dwm-3.4, (C)opyright MMVI-MMVII Anselm R. Garbe\n", stdout);
   1.109  		exit(EXIT_SUCCESS);
   1.110  	} else if(argc != 1) {
   1.111 -		eprint("usage: dwm [-v]\n");
   1.112 +		eprint("usage: aewl [-v]\n");
   1.113  	}
   1.114  	setlocale(LC_CTYPE, "");
   1.115  	dpy = XOpenDisplay(0);
   1.116  	if(!dpy) {
   1.117 -		eprint("dwm: cannot open display\n");
   1.118 +		eprint("aewl: cannot open display\n");
   1.119  	}
   1.120  	xfd = ConnectionNumber(dpy);
   1.121  	screen = DefaultScreen(dpy);
   1.122 @@ -1675,7 +1667,7 @@
   1.123  	XSelectInput(dpy, root, SubstructureRedirectMask);
   1.124  	XSync(dpy, False);
   1.125  	if(otherwm) {
   1.126 -		eprint("dwm: another window manager is already running\n");
   1.127 +		eprint("aewl: another window manager is already running\n");
   1.128  	}
   1.129  
   1.130  	XSync(dpy, False);