import bcd.xcb.xcb; import std.stdio; void main(){ int screen_num; xcb_connection_t* conn = xcb_connect(null, &screen_num); /* Get the preferred screen. */ xcb_screen_iterator_t screen_iter = xcb_setup_roots_iterator(xcb_get_setup(conn)); while(screen_num--) xcb_screen_next(&screen_iter); xcb_screen_t* screen = screen_iter.data; xcb_get_geometry_reply_t* attr = xcb_get_geometry_reply(conn, xcb_get_geometry(conn, screen.root), null); writefln(attr.width); }