aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--config.def.h40
2 files changed, 42 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index be58030..baae4d9 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,8 @@ options:
.c.o:
${CC} -c ${CFLAGS} $<
-${OBJ}: config.mk
+config.h:
+ cp config.def.h config.h
shotkey: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
diff --git a/config.def.h b/config.def.h
new file mode 100644
index 0000000..ebab43c
--- /dev/null
+++ b/config.def.h
@@ -0,0 +1,40 @@
+// Shell
+char shell[] = "/bin/sh";
+
+#define Super Mod4Mask
+
+enum {
+ Music,
+ Bright,
+
+ // Declare modes above this
+ MODE_SIZE,
+};
+
+// Define mode key bindings here
+// NOTE: "10" here is the maximum number of key bindings for each mode
+Key modes[MODE_SIZE][10] = {
+ [Music] = {
+ { 0, XK_m, cmd("notify-send inside_music") },
+ },
+ [Bright] = {
+ { 0, XK_m, cmd("notify-send inside_bright") },
+ { 0, XK_n, cmd("notify-send inside_bright_1") },
+ },
+};
+
+// Define normal mode key bindings here
+Key keys[] = {
+ { Super|ShiftMask, XK_y, cmd("notify-send hello") },
+ { Super|ShiftMask, XK_z, mode(Music, False) },
+ { Super|ShiftMask, XK_x, mode(Bright, True) },
+};
+
+ModeProperties mode_properties[MODE_SIZE] = {
+ [Music] = { "Music player" },
+ [Bright] = { "Brightness" },
+};
+
+// Call this script on mode change
+char* on_mode_change = "notify-send \"kadj [$SHOTKEY_MODE_ID] $SHOTKEY_MODE_LABEL\"";
+