diff options
| author | Simeon Simeonov | 2020-03-12 12:30:51 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2020-03-12 12:30:51 +0100 |
| commit | 69a05d516bd0c7e369a0ba1fb78aac57a5ea26f2 (patch) | |
| tree | 87e37110ea0e328533a41c3b16b64036ff132641 /i3lock.h | |
Initial commit for the last i3lock commit at this time f3b061233e28ad0cf920c9421adc2459b6920812
Diffstat (limited to 'i3lock.h')
| -rw-r--r-- | i3lock.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/i3lock.h b/i3lock.h new file mode 100644 index 0000000..57190e5 --- /dev/null +++ b/i3lock.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #ifndef _I3LOCK_H | ||
| 2 | #define _I3LOCK_H | ||
| 3 | |||
| 4 | /* This macro will only print debug output when started with --debug. | ||
| 5 | * This is important because xautolock (for example) closes stdout/stderr by | ||
| 6 | * default, so just printing something to stdout will lead to the data ending | ||
| 7 | * up on the X11 socket (!). */ | ||
| 8 | #define DEBUG(fmt, ...) \ | ||
| 9 | do { \ | ||
| 10 | if (debug_mode) \ | ||
| 11 | printf("[i3lock-debug] " fmt, ##__VA_ARGS__); \ | ||
| 12 | } while (0) | ||
| 13 | |||
| 14 | #endif | ||
