aewl
view cmd.c @ 23:95ffdfd0a819
some more additions/fixes
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Wed, 12 Jul 2006 00:00:25 +0200 |
parents | 5c078b66347b |
children | e8f627998d6f |
line source
1 /*
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
4 */
6 #include "wm.h"
7 #include <stdio.h>
8 #include <string.h>
10 void
11 run(void *aux)
12 {
13 spawn(dpy, aux);
14 }
16 void
17 quit(void *aux)
18 {
19 running = False;
20 }
22 void
23 sel(void *aux)
24 {
25 const char *arg = aux;
26 Client *c;
28 if(!arg || !stack)
29 return;
30 if(!strncmp(arg, "next", 5))
31 focus(stack->snext ? stack->snext : stack);
32 else if(!strncmp(arg, "prev", 5)) {
33 for(c = stack; c && c->snext; c = c->snext);
34 focus(c ? c : stack);
35 }
36 }
38 void
39 kill(void *aux)
40 {
41 Client *c = stack;
43 if(!c)
44 return;
45 if(c->proto & WM_PROTOCOL_DELWIN)
46 send_message(c->win, wm_atom[WMProtocols], wm_atom[WMDelete]);
47 else
48 XKillClient(dpy, c->win);
49 }