#include <stdlib.h>
#include <stdio.h>
+#include <signal.h>
#include "util.h"
#include "conf.h"
+#include "types.h"
#include "sys.h"
#include "wm.h"
+void on_sigint(int signum)
+{
+ sys_exit();
+}
+
int main(int argc, char **argv)
{
setbuf(stdout, NULL); // debug
+ signal(SIGINT, on_sigint);
+
conf_init(argc, argv);
- win_t *root = sys_init();
- wm_init(root);
+ sys_init();
+ wm_init();
- sys_run(root);
+ sys_run();
- wm_free(root);
- sys_free(root);
+ wm_free();
+ sys_free();
return 0;
}