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