summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJohannes Bensmann <johannesbensmann@gmx.de>2019-06-08 20:48:18 +0200
committerJohannes Bensmann <johannesbensmann@gmx.de>2019-06-08 20:48:18 +0200
commit51eb5c314df7e383d31968d1825984348a590780 (patch)
treeedc5508bd7d4bd27b0e21ec58945db4bf34607b3 /config.h
parent6d56714629eb48640ad66f8f849f38c66d0afc84 (diff)
moved configuration to config.h
Diffstat (limited to 'config.h')
-rw-r--r--config.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..7023886
--- /dev/null
+++ b/config.h
@@ -0,0 +1,52 @@
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+/* the rate at which the mouse moves */
+#define MOVE_RATE 30
+
+/* the speed with no modifier */
+#define DEFAULT_SPEED 10
+
+#define EXIT_KEY XK_q
+
+typedef struct {
+ KeySym keysym;
+ int x;
+ int y;
+} MoveBinding;
+
+typedef struct {
+ KeySym keysym;
+ int button;
+} ClickBinding;
+
+typedef struct {
+ KeySym keysym;
+ int speed;
+} SpeedBindings;
+
+static MoveBinding move_bindings[] = {
+ /* key x y */
+ { XK_j, -1, 0 },
+ { XK_l, 1, 0 },
+ { XK_i, 0, -1 },
+ { XK_comma, 0, 1 },
+ { XK_u, -1, -1 },
+ { XK_o, 1, -1 },
+ { XK_m, -1, 1 },
+ { XK_period, 1, 1 },
+};
+
+static ClickBinding click_bindings[] = {
+ /* key button */
+ { XK_f, 1 },
+ { XK_d, 2 },
+ { XK_s, 3 },
+};
+
+static SpeedBindings speed_bindings[] = {
+ /* key speed */
+ { XK_Super_L, 200 },
+ { XK_Alt_L, 50 },
+ { XK_a, 2 },
+};