From 4f6f940ca6686cfe1cd5197c2a32605c024a3934 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 21 Jun 2020 22:38:29 +0530 Subject: Adds config.def.h for default config --- Makefile | 3 ++- config.def.h | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 config.def.h 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\""; + -- cgit v1.3.1