Rewrite the entire code-base

The following changes are focused upon:
- Modularity
- Doing away with globals
- No heap allocations
- Better command line interface
- Switch from Xlib to XCB
- More verbose type definitions
- Implement a single-file config by utilising X-macros
This commit is contained in:
Utkarsh Verma
2023-10-24 08:44:31 +05:30
parent 2773129533
commit bc84d094cd
30 changed files with 918 additions and 396 deletions

14
include/main.h Normal file
View File

@@ -0,0 +1,14 @@
#pragma once
#include <signal.h>
#include "block.h"
#include "config.h"
#include "util.h"
// Utilise C's adjacent string concatenation to count the number of blocks.
#define X(...) "."
extern block blocks[LEN(BLOCKS(X)) - 1];
#undef X
#define REFRESH_SIGNAL SIGUSR1