i3/i3bar/src/main.c

33 lines
569 B
C
Raw Normal View History

2010-07-22 22:43:43 -04:00
#include <stdio.h>
#include <i3/ipc.h>
2010-07-22 22:43:43 -04:00
#include <string.h>
#include <unistd.h>
#include <ev.h>
2010-07-21 19:15:18 -04:00
#include "ipc.h"
#include "outputs.h"
#include "workspaces.h"
#include "common.h"
#include "xcb.h"
int main(int argc, char **argv) {
main_loop = ev_default_loop(0);
init_xcb();
2010-07-22 22:43:43 -04:00
init_connection("/home/mero/.i3/ipc.sock");
2010-07-21 19:15:18 -04:00
2010-07-22 22:43:43 -04:00
subscribe_events();
2010-07-21 19:15:18 -04:00
i3_send_msg(I3_IPC_MESSAGE_TYPE_GET_OUTPUTS, NULL);
2010-07-26 11:21:46 -04:00
i3_send_msg(I3_IPC_MESSAGE_TYPE_GET_WORKSPACES, NULL);
2010-07-21 19:15:18 -04:00
ev_loop(main_loop, 0);
ev_default_destroy();
clean_xcb();
free_outputs();
free_workspaces();
return 0;
}