summaryrefslogtreecommitdiff
path: root/#config.h#
blob: 26e80046a590a73a5cf8a6348ce928f5c6208df9 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <X11/keysym.h>
#include <X11/Xlib.h>

#include <vector>
#include <string>

//Startup
std::string startup[] = {"picom -fD 3", "feh --bg-scale /usr/share/backgrounds/vapor_trails_blue.png"};

//Main config
int gaps = 10;
int outerGaps = 30;

//Keys
//The types and perhaps functions likely to be moved to seperate header file later
typedef union
{
	const int num;
	const char** str;
} 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);
void changeWS(const KeyArg arg);

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

#define WSKEY(K, X)								\
	{K, mod, changeWS, {.num = X - 1}},

unsigned int mod = Mod1Mask;

static struct Key keyBinds[] = {
	//Key			//Modifiers		//Func			//Args
	{XK_E, 			mod,			exit,			{NULL}},
	{XK_Return,		mod, 			spawn,			{.str = alacritty}},
	{XK_D,			mod,	 		spawn,			{.str = rofi}},
	{XK_T,			mod,			toggle,			{NULL}},
	{XK_Q,			mod,			kill,			{NULL}},
	{XK_1,			mod,			changeWS,		{NULL},
	{XK_2,			mod,			changeWS,		{NULL}},
	{XK_3,			mod,			changeWS,		{.num = 2}},
	{XK_4,			mod,			changeWS,		{.num = 3}},
	{XK_5,			mod,			changeWS,		{.num = 4}},
	//WSKEY(XK_1, 1)
	//WSKEY(XK_2, 2)
	//WSKEY(XK_3, 3)
	//WSKEY(XK_4, 4)
	//WSKEY(XK_5, 5)
};