about summary refs log tree commit diff stats
path: root/cmd.c
blob: 9ac4e729eab09cbf97efa7fac2000c4a4fcf3c77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
 * See LICENSE file for license details.
 */

#include "wm.h"
#include <stdio.h>

void
run(char *arg)
{
	spawn(dpy, arg);
}

void
quit(char *arg)
{
	fputs("quit\n", stderr);
	running = False;
}

void
kill(char *arg)
{
	Client *c = stack;

	if(!c)
		return;
	if(c->proto & WM_PROTOCOL_DELWIN)
		send_message(c->win, wm_atom[WMProtocols], wm_atom[WMDelete]);
	else
		XKillClient(dpy, c->win);
}