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