Abstracted draw_text and predict_text_width into libi3. Use predict_text_width from libi3 in i3 too. This required tracking xcb_connection in a xcb_connection_t *conn variable that libi3 expects to be available in i3bar.