summaryrefslogtreecommitdiff
path: root/config.h
blob: 4fa6ee327b91e46b2dcb13bc45420c09ef0e0d04 (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
35
#include <X11/keysym.h>

typedef union
{
	const char** str;
	const int* num;
} KeyArg;

struct Key
{
	KeySym keysym;
	unsigned int modifiers;
	void (*function)(const KeyArg arg);
	const KeyArg arg;
};

//Keybind commands
void exit(const KeyArg arg);
void spawn(const KeyArg arg);
void toggle(const KeyArg arg);
void kill(const KeyArg arg);

const char* alacritty[] = {"alacritty", NULL};
const char* rofi[] = {"rofi", "-i", "-show" "drun", NULL};

unsigned int mod = Mod1Mask;

static struct Key keyBinds[] = {
	//Key			//Modifiers		//Func			//Args
	{XK_E, 			mod,			exit,			{NULL}},
	{XK_Return,		mod, 			spawn,			{alacritty}},
	{XK_D,			mod,	 		spawn,			{rofi}},
	{XK_T,			mod,			toggle,			{NULL}},
	{XK_Q,			mod,			kill,			{NULL}}
};