X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=main.c;h=327066e625dfdf5bfb7f615826b4e92be46690cf;hb=c92c369d2828143182f9223646073dfb6bc1e421;hp=119005e346957bbac926d42fdb3fca157cddcf7e;hpb=a6f2be4a52a3dd478c0640714c5be9c5cf87c64e;p=wmpus diff --git a/main.c b/main.c index 119005e..327066e 100644 --- a/main.c +++ b/main.c @@ -15,16 +15,32 @@ #include #include +#include #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 - win_t *root = sys_init(); - wm_init(root); - sys_run(root); + signal(SIGINT, on_sigint); + + conf_init(argc, argv); + sys_init(); + wm_init(); + + sys_run(); + + wm_free(); + sys_free(); + conf_free(); return 0; }