summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'config.h')
-rw-r--r--config.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/config.h b/config.h
index 18d0a93..4fa6ee3 100644
--- a/config.h
+++ b/config.h
@@ -1,15 +1,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;
};
-Key keyBinds[] = {
- {XK_E, Mod1Mask},
- {XK_Return, Mod1Mask},
- {XK_D, Mod1Mask},
- {XK_T, Mod1Mask}
+//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}}
};
-