From a6fe40e67b8d0dbde3cac2a0be913c7dd4df9643 Mon Sep 17 00:00:00 2001 From: uint23 Date: Thu, 17 Apr 2025 13:22:12 +0100 Subject: inc, dec gaps --- src/defs.h | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'src/defs.h') diff --git a/src/defs.h b/src/defs.h index c9ca97b..3c5b236 100644 --- a/src/defs.h +++ b/src/defs.h @@ -4,42 +4,43 @@ #include #include -#define SXWM_VERSION "sxwm ver. 0.1.1" -#define SXWM_AUTHOR "(C) Abhinav Prasai 2025" -#define SXWM_LICINFO "See LICENSE for more info" +#define SXWM_VERSION "sxwm ver. 0.1.1" +#define SXWM_AUTHOR "(C) Abhinav Prasai 2025" +#define SXWM_LICINFO "See LICENSE for more info" -#define ALT Mod1Mask -#define SUPER Mod4Mask -#define SHIFT ShiftMask +#define ALT Mod1Mask +#define SUPER Mod4Mask +#define SHIFT ShiftMask #define LENGTH(X) (sizeof X / sizeof X[0]) #define BIND(mod, key, cmdstr) { (mod), XK_##key, { cmdstr }, 0 } -#define CALL(mod, key, fnptr) { (mod), XK_##key, { .fn = fnptr }, 1 } +#define CALL(mod, key, fnptr) { (mod), XK_##key, { .fn = fnptr }, 1 } #define UDIST(a,b) abs((int)(a) - (int)(b)) -#define SNAP_EDGE(pos, size, bound) \ - do { \ - if (UDIST(pos, 0) < SNAP_DISTANCE) \ - pos = 0; \ - else if (UDIST(pos, (bound) - (size)) < SNAP_DISTANCE)\ - pos = (bound) - (size); \ +#define SNAP_EDGE(pos, size, bound) \ + do { \ + if (UDIST(pos, 0) < SNAP_DISTANCE) \ + pos = 0; \ + else if (UDIST(pos, (bound) - (size)) < SNAP_DISTANCE) \ + pos = (bound) - (size); \ } while (0) #define MAXCLIENTS 64 +#define MAXGAPS 100 enum { DRAG_NONE, DRAG_MOVE, DRAG_RESIZE } drag_mode = DRAG_NONE; typedef void (*EventHandler)(XEvent *); typedef union { - const char **cmd; - void (*fn)(void); + const char **cmd; + void (*fn)(void); } Action; typedef struct { - unsigned int mods; - KeySym keysym; - Action action; - int is_func; + unsigned int mods; + KeySym keysym; + Action action; + int is_func; } Binding; typedef struct Client{ -- cgit v1.2.3