diff options
| author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-12 16:00:51 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-12 16:00:51 +0200 |
| commit | 4641aa2925731ac180b08c80f57db176391ea4a9 (patch) | |
| tree | 0908650ef67b9dc4040d026fdd4492ac29f75d7d /cmd.c | |
| parent | simplified several portions of code through replacing rect structs with x,y,h... (diff) | |
| download | dwm-4641aa2925731ac180b08c80f57db176391ea4a9.tar.gz dwm-4641aa2925731ac180b08c80f57db176391ea4a9.zip | |
added grid mode on Mod1Mask g
Diffstat (limited to '')
| -rw-r--r-- | cmd.c | 52 |
1 files changed, 0 insertions, 52 deletions
| @@ -1,52 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> | ||
| 3 | * See LICENSE file for license details. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #include "wm.h" | ||
| 7 | #include <stdio.h> | ||
| 8 | #include <string.h> | ||
| 9 | |||
| 10 | void | ||
| 11 | run(void *aux) | ||
| 12 | { | ||
| 13 | spawn(dpy, aux); | ||
| 14 | } | ||
| 15 | |||
| 16 | void | ||
| 17 | quit(void *aux) | ||
| 18 | { | ||
| 19 | running = False; | ||
| 20 | } | ||
| 21 | |||
| 22 | void | ||
| 23 | sel(void *aux) | ||
| 24 | { | ||
| 25 | const char *arg = aux; | ||
| 26 | Client *c = NULL; | ||
| 27 | |||
| 28 | if(!arg || !stack) | ||
| 29 | return; | ||
| 30 | if(!strncmp(arg, "next", 5)) | ||
| 31 | c = stack->snext ? stack->snext : stack; | ||
| 32 | else if(!strncmp(arg, "prev", 5)) | ||
| 33 | for(c = stack; c && c->snext; c = c->snext); | ||
| 34 | if(!c) | ||
| 35 | c = stack; | ||
| 36 | raise(c); | ||
| 37 | focus(c); | ||
| 38 | } | ||
| 39 | |||
| 40 | void | ||
| 41 | kill(void *aux) | ||
| 42 | { | ||
| 43 | Client *c = stack; | ||
| 44 | |||
| 45 | if(!c) | ||
| 46 | return; | ||
| 47 | if(c->proto & WM_PROTOCOL_DELWIN) | ||
| 48 | send_message(c->win, wm_atom[WMProtocols], wm_atom[WMDelete]); | ||
| 49 | else | ||
| 50 | XKillClient(dpy, c->win); | ||
| 51 | } | ||
| 52 | |||
