]> git.lizzy.rs Git - bspwm.git/blob - helpers.h
Toggle fullscreen, cycle leaf, more messages
[bspwm.git] / helpers.h
1 #ifndef _HELPERS_H
2 #define _HELPERS_H
3
4 #define LENGTH(x)         (sizeof(x) / sizeof(*x))
5 #define MAX(A, B)         ((A) > (B) ? (A) : (B))
6 #define MIN(A, B)         ((A) < (B) ? (A) : (B))
7 #define BOOLSTR(A)        ((A) ? "true" : "false")
8
9 #define MAXLEN  256
10 #define XCB_CONFIG_WINDOW_X_Y_WIDTH_HEIGHT XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT
11
12 #if 1
13 #  define PUTS(x)            puts(x);
14 #  define PRINTF(x,...)      printf(x, ##__VA_ARGS__);
15 #else
16 #  define PUTS(x)            ;
17 #  define PRINTF(x)          ;
18 #endif
19
20 typedef enum {
21     false,
22     true
23 } bool;
24
25 #endif