2 * vim:ts=4:sw=4:expandtab
4 * i3 - an improved dynamic tiling window manager
5 * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
7 * i3.h: global variables that are used all over i3.
13 #include <sys/resource.h>
15 #include <xcb/xcb_keysyms.h>
18 #include <X11/XKBlib.h>
20 #define SN_API_NOT_YET_FROZEN 1
21 #include <libsn/sn-launcher.h>
27 /** Git commit identifier, from version.c */
28 extern const char *i3_version;
30 /** The original value of RLIMIT_CORE when i3 was started. We need to restore
31 * this before starting any other process, since we set RLIMIT_CORE to
32 * RLIM_INFINITY for i3 debugging versions. */
33 extern struct rlimit original_rlimit_core;
34 /** Whether this version of i3 is a debug build or a release build. */
35 extern bool debug_build;
36 /** The number of file descriptors passed via socket activation. */
37 extern int listen_fds;
38 extern xcb_connection_t *conn;
39 extern int conn_screen;
40 /** The last timestamp we got from X11 (timestamps are included in some events
41 * and are used for some things, like determining a unique ID in startup
43 extern xcb_timestamp_t last_timestamp;
44 extern SnDisplay *sndisplay;
45 extern xcb_key_symbols_t *keysyms;
46 extern char **start_argv;
47 extern Display *xlibdpy, *xkbdpy;
48 extern int xkb_current_group;
49 extern TAILQ_HEAD(bindings_head, Binding) * bindings;
50 extern TAILQ_HEAD(autostarts_head, Autostart) autostarts;
51 extern TAILQ_HEAD(autostarts_always_head, Autostart) autostarts_always;
52 extern TAILQ_HEAD(ws_assignments_head, Workspace_Assignment) ws_assignments;
53 extern TAILQ_HEAD(assignments_head, Assignment) assignments;
54 extern SLIST_HEAD(stack_wins_head, Stack_Window) stack_wins;
55 extern xcb_screen_t *root_screen;
57 /* Color depth, visual id and colormap to use when creating windows and
58 * pixmaps. Will use 32 bit depth and an appropriate visual, if available,
59 * otherwise the root window’s default (usually 24 bit TrueColor). */
60 extern uint8_t root_depth;
61 extern xcb_visualid_t visual_id;
62 extern xcb_colormap_t colormap;
64 extern bool xcursor_supported, xkb_supported;
65 extern xcb_window_t root;
66 extern struct ev_loop *main_loop;
67 extern bool only_check_config;