2 #define I3__FILE__ "main.c"
14 #include <sys/types.h>
15 #include <sys/socket.h>
18 #include <sys/resource.h>
115 xcb_generic_event_t *event;
117 while ((event = xcb_poll_for_event(
conn)) != NULL) {
118 if (event->response_type == 0) {
120 DLOG(
"Expected X11 Error received for sequence %x\n", event->sequence);
122 xcb_generic_error_t *error = (xcb_generic_error_t *)event;
123 DLOG(
"X11 Error received (probably harmless)! sequence 0x%x, error_code = %d\n",
124 error->sequence, error->error_code);
131 int type = (
event->response_type & 0x7F);
146 DLOG(
"Setting main X11 callback to enabled=%d\n", enable);
165 #if EV_VERSION_MAJOR >= 4
170 fprintf(stderr,
"Closing SHM log \"%s\"\n",
shmlogname);
189 int main(
int argc,
char *argv[]) {
193 char *override_configpath = NULL;
194 bool autostart =
true;
195 char *layout_path = NULL;
196 bool delete_layout_path =
false;
197 bool force_xinerama =
false;
198 char *fake_outputs = NULL;
199 bool disable_signalhandler =
false;
201 static struct option long_options[] = {
202 {
"no-autostart", no_argument, 0,
'a'},
203 {
"config", required_argument, 0,
'c'},
204 {
"version", no_argument, 0,
'v'},
205 {
"moreversion", no_argument, 0,
'm'},
206 {
"more-version", no_argument, 0,
'm'},
207 {
"more_version", no_argument, 0,
'm'},
208 {
"help", no_argument, 0,
'h'},
209 {
"layout", required_argument, 0,
'L'},
210 {
"restart", required_argument, 0, 0},
211 {
"force-xinerama", no_argument, 0, 0},
212 {
"force_xinerama", no_argument, 0, 0},
213 {
"disable-signalhandler", no_argument, 0, 0},
214 {
"shmlog-size", required_argument, 0, 0},
215 {
"shmlog_size", required_argument, 0, 0},
216 {
"get-socketpath", no_argument, 0, 0},
217 {
"get_socketpath", no_argument, 0, 0},
218 {
"fake_outputs", required_argument, 0, 0},
219 {
"fake-outputs", required_argument, 0, 0},
220 {
"force-old-config-parser-v4.4-only", no_argument, 0, 0},
222 int option_index = 0, opt;
224 setlocale(LC_ALL,
"");
231 if (!isatty(fileno(stdout)))
232 setbuf(stdout, NULL);
245 while ((opt = getopt_long(argc, argv,
"c:CvmaL:hld:V", long_options, &option_index)) != -1) {
248 LOG(
"Autostart disabled using -a\n");
254 delete_layout_path =
false;
257 FREE(override_configpath);
258 override_configpath =
sstrdup(optarg);
261 LOG(
"Checking configuration file only (-C)\n");
262 only_check_config =
true;
265 printf(
"i3 version %s © 2009 Michael Stapelberg and contributors\n",
i3_version);
269 printf(
"Binary i3 version: %s © 2009 Michael Stapelberg and contributors\n",
i3_version);
277 LOG(
"Enabling debug logging\n");
284 if (strcmp(long_options[option_index].name,
"force-xinerama") == 0 ||
285 strcmp(long_options[option_index].name,
"force_xinerama") == 0) {
286 force_xinerama =
true;
287 ELOG(
"Using Xinerama instead of RandR. This option should be "
288 "avoided at all cost because it does not refresh the list "
289 "of screens, so you cannot configure displays at runtime. "
290 "Please check if your driver really does not support RandR "
291 "and disable this option as soon as you can.\n");
293 }
else if (strcmp(long_options[option_index].name,
"disable-signalhandler") == 0) {
294 disable_signalhandler =
true;
296 }
else if (strcmp(long_options[option_index].name,
"get-socketpath") == 0 ||
297 strcmp(long_options[option_index].name,
"get_socketpath") == 0) {
300 printf(
"%s\n", socket_path);
305 }
else if (strcmp(long_options[option_index].name,
"shmlog-size") == 0 ||
306 strcmp(long_options[option_index].name,
"shmlog_size") == 0) {
313 }
else if (strcmp(long_options[option_index].name,
"restart") == 0) {
316 delete_layout_path =
true;
318 }
else if (strcmp(long_options[option_index].name,
"fake-outputs") == 0 ||
319 strcmp(long_options[option_index].name,
"fake_outputs") == 0) {
320 LOG(
"Initializing fake outputs: %s\n", optarg);
321 fake_outputs =
sstrdup(optarg);
323 }
else if (strcmp(long_options[option_index].name,
"force-old-config-parser-v4.4-only") == 0) {
324 ELOG(
"You are passing --force-old-config-parser-v4.4-only, but that flag was removed by now.\n");
329 fprintf(stderr,
"Usage: %s [-c configfile] [-d all] [-a] [-v] [-V] [-C]\n", argv[0]);
330 fprintf(stderr,
"\n");
331 fprintf(stderr,
"\t-a disable autostart ('exec' lines in config)\n");
332 fprintf(stderr,
"\t-c <file> use the provided configfile instead\n");
333 fprintf(stderr,
"\t-C validate configuration file and exit\n");
334 fprintf(stderr,
"\t-d all enable debug output\n");
335 fprintf(stderr,
"\t-L <file> path to the serialized layout during restarts\n");
336 fprintf(stderr,
"\t-v display version and exit\n");
337 fprintf(stderr,
"\t-V enable verbose mode\n");
338 fprintf(stderr,
"\n");
339 fprintf(stderr,
"\t--force-xinerama\n"
340 "\tUse Xinerama instead of RandR.\n"
341 "\tThis option should only be used if you are stuck with the\n"
342 "\told nVidia closed source driver (older than 302.17), which does\n"
343 "\tnot support RandR.\n");
344 fprintf(stderr,
"\n");
345 fprintf(stderr,
"\t--get-socketpath\n"
346 "\tRetrieve the i3 IPC socket path from X11, print it, then exit.\n");
347 fprintf(stderr,
"\n");
348 fprintf(stderr,
"\t--shmlog-size <limit>\n"
349 "\tLimits the size of the i3 SHM log to <limit> bytes. Setting this\n"
350 "\tto 0 disables SHM logging entirely.\n"
351 "\tThe default is %d bytes.\n",
353 fprintf(stderr,
"\n");
354 fprintf(stderr,
"If you pass plain text arguments, i3 will interpret them as a command\n"
355 "to send to a currently running i3 (like i3-msg). This allows you to\n"
356 "use nice and logical commands, such as:\n"
359 "\ti3 floating toggle\n"
366 if (only_check_config) {
379 LOG(
"Additional arguments passed. Sending them as a command to i3.\n");
380 char *payload = NULL;
381 while (optind < argc) {
383 payload =
sstrdup(argv[optind]);
386 sasprintf(&both,
"%s %s", payload, argv[optind]);
392 DLOG(
"Command is: %s (%zd bytes)\n", payload, strlen(payload));
395 ELOG(
"Could not get i3 IPC socket path\n");
399 int sockfd = socket(AF_LOCAL, SOCK_STREAM, 0);
401 err(EXIT_FAILURE,
"Could not create socket");
403 struct sockaddr_un addr;
404 memset(&addr, 0,
sizeof(
struct sockaddr_un));
405 addr.sun_family = AF_LOCAL;
406 strncpy(addr.sun_path, socket_path,
sizeof(addr.sun_path) - 1);
407 if (connect(sockfd, (
const struct sockaddr *)&addr,
sizeof(
struct sockaddr_un)) < 0)
408 err(EXIT_FAILURE,
"Could not connect to i3");
411 (uint8_t *)payload) == -1)
412 err(EXIT_FAILURE,
"IPC: write()");
414 uint32_t reply_length;
418 if ((ret =
ipc_recv_message(sockfd, &reply_type, &reply_length, &reply)) != 0) {
420 err(EXIT_FAILURE,
"IPC: read()");
423 if (reply_type != I3_IPC_MESSAGE_TYPE_COMMAND)
424 errx(EXIT_FAILURE,
"IPC: received reply of type %d but expected %d (COMMAND)", reply_type, I3_IPC_MESSAGE_TYPE_COMMAND);
425 printf(
"%.*s\n", reply_length, reply);
434 struct rlimit limit = {RLIM_INFINITY, RLIM_INFINITY};
435 setrlimit(RLIMIT_CORE, &limit);
439 LOG(
"CORE DUMPS: You are running a development version of i3, so coredumps were automatically enabled (ulimit -c unlimited).\n");
440 size_t cwd_size = 1024;
443 while ((cwd_ret = getcwd(cwd, cwd_size)) == NULL && errno == ERANGE) {
444 cwd_size = cwd_size * 2;
448 LOG(
"CORE DUMPS: Your current working directory is \"%s\".\n", cwd);
450 if ((patternfd = open(
"/proc/sys/kernel/core_pattern", O_RDONLY)) >= 0) {
451 memset(cwd,
'\0', cwd_size);
452 if (read(patternfd, cwd, cwd_size) > 0)
454 LOG(
"CORE DUMPS: Your core_pattern is: \"%s\".\n", cwd);
463 if (xcb_connection_has_error(
conn))
464 errx(EXIT_FAILURE,
"Cannot open display\n");
473 die(
"Could not initialize libev. Bad LIBEV_FLAGS?\n");
479 #define xmacro(atom) \
480 xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom);
481 #include "atoms.xmacro"
491 xcb_void_cookie_t cm_cookie = xcb_create_colormap_checked(
conn,
492 XCB_COLORMAP_ALLOC_NONE,
497 xcb_generic_error_t *error = xcb_request_check(
conn, cm_cookie);
499 ELOG(
"Could not create colormap. Error code: %d\n", error->error_code);
507 DLOG(
"root_screen->height_in_pixels = %d, root_screen->height_in_millimeters = %d, dpi = %d\n",
510 DLOG(
"One logical pixel corresponds to %d physical pixels on this display.\n",
logical_px(1));
512 xcb_get_geometry_cookie_t gcookie = xcb_get_geometry(
conn,
root);
513 xcb_query_pointer_cookie_t pointercookie = xcb_query_pointer(
conn,
root);
516 #define xmacro(name) \
518 xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, name##_cookie, NULL); \
520 ELOG("Could not get atom " #name "\n"); \
523 A_##name = reply->atom; \
526 #include "atoms.xmacro"
539 xcb_void_cookie_t cookie;
541 check_error(
conn, cookie,
"Another window manager seems to be running");
543 xcb_get_geometry_reply_t *greply = xcb_get_geometry_reply(
conn, gcookie, NULL);
544 if (greply == NULL) {
545 ELOG(
"Could not get geometry of the root window, exiting\n");
548 DLOG(
"root geometry reply: (%d, %d) %d x %d\n", greply->x, greply->y, greply->width, greply->height);
559 const xcb_query_extension_reply_t *extreply;
560 extreply = xcb_get_extension_data(
conn, &xcb_xkb_id);
562 if (!extreply->present) {
563 DLOG(
"xkb is not present on this server\n");
565 DLOG(
"initializing xcb-xkb\n");
566 xcb_xkb_use_extension(
conn, XCB_XKB_MAJOR_VERSION, XCB_XKB_MINOR_VERSION);
567 xcb_xkb_select_events(
conn,
568 XCB_XKB_ID_USE_CORE_KBD,
569 XCB_XKB_EVENT_TYPE_STATE_NOTIFY | XCB_XKB_EVENT_TYPE_MAP_NOTIFY | XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY,
571 XCB_XKB_EVENT_TYPE_STATE_NOTIFY | XCB_XKB_EVENT_TYPE_MAP_NOTIFY | XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY,
581 xcb_xkb_per_client_flags_reply_t *pcf_reply;
586 pcf_reply = xcb_xkb_per_client_flags_reply(
588 xcb_xkb_per_client_flags(
590 XCB_XKB_ID_USE_CORE_KBD,
591 XCB_XKB_PER_CLIENT_FLAG_GRABS_USE_XKB_STATE | XCB_XKB_PER_CLIENT_FLAG_LOOKUP_STATE_WHEN_GRABBED,
592 XCB_XKB_PER_CLIENT_FLAG_GRABS_USE_XKB_STATE | XCB_XKB_PER_CLIENT_FLAG_LOOKUP_STATE_WHEN_GRABBED,
597 if (pcf_reply == NULL ||
598 !(pcf_reply->value & XCB_XKB_PER_CLIENT_FLAG_GRABS_USE_XKB_STATE)) {
599 ELOG(
"Could not set XCB_XKB_PER_CLIENT_FLAG_GRABS_USE_XKB_STATE\n");
601 if (pcf_reply == NULL ||
602 !(pcf_reply->value & XCB_XKB_PER_CLIENT_FLAG_LOOKUP_STATE_WHEN_GRABBED)) {
603 ELOG(
"Could not set XCB_XKB_PER_CLIENT_FLAG_LOOKUP_STATE_WHEN_GRABBED\n");
620 die(
"Could not load keymap\n");
625 bool needs_tree_init =
true;
627 LOG(
"Trying to restore the layout from \"%s\".\n", layout_path);
629 if (delete_layout_path) {
631 const char *dir = dirname(layout_path);
647 if (fake_outputs != NULL) {
657 DLOG(
"Checking for XRandR...\n");
663 xcb_query_pointer_reply_t *pointerreply;
665 if (!(pointerreply = xcb_query_pointer_reply(
conn, pointercookie, NULL))) {
666 ELOG(
"Could not query pointer position, using first screen\n");
668 DLOG(
"Pointer at %d, %d\n", pointerreply->root_x, pointerreply->root_y);
671 ELOG(
"ERROR: No screen at (%d, %d), starting on the first screen\n",
672 pointerreply->root_x, pointerreply->root_y);
684 if (ipc_socket == -1) {
685 ELOG(
"Could not create the IPC socket, IPC disabled\n");
687 struct ev_io *ipc_io =
scalloc(1,
sizeof(
struct ev_io));
697 ELOG(
"socket activation: Error in sd_listen_fds\n");
699 DLOG(
"socket activation: no sockets passed\n");
705 DLOG(
"socket activation: also listening on fd %d\n", fd);
710 if ((flags = fcntl(fd, F_GETFD)) < 0 ||
711 fcntl(fd, F_SETFD, flags & ~FD_CLOEXEC) < 0) {
712 ELOG(
"Could not disable FD_CLOEXEC on fd %d\n", fd);
715 struct ev_io *ipc_io =
scalloc(1,
sizeof(
struct ev_io));
731 struct ev_io *xcb_watcher =
scalloc(1,
sizeof(
struct ev_io));
733 struct ev_prepare *xcb_prepare =
scalloc(1,
sizeof(
struct ev_prepare));
742 ev_prepare_start(
main_loop, xcb_prepare);
759 xcb_grab_server(
conn);
762 xcb_generic_event_t *event;
763 while ((event = xcb_poll_for_event(
conn)) != NULL) {
764 if (event->response_type == 0) {
770 int type = (
event->response_type & 0x7F);
775 if (type == XCB_MAP_REQUEST)
782 xcb_ungrab_server(
conn);
785 LOG(
"This is not an in-place restart, copying root window contents to a pixmap\n");
787 uint16_t
width = root->width_in_pixels;
788 uint16_t
height = root->height_in_pixels;
790 xcb_gcontext_t gc = xcb_generate_id(
conn);
792 xcb_create_pixmap(
conn, root->root_depth, pixmap, root->root, width, height);
794 xcb_create_gc(
conn, gc, root->root,
795 XCB_GC_FUNCTION | XCB_GC_PLANE_MASK | XCB_GC_FILL_STYLE | XCB_GC_SUBWINDOW_MODE,
796 (uint32_t[]){XCB_GX_COPY, ~0, XCB_FILL_STYLE_SOLID, XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS});
799 xcb_change_window_attributes_checked(
conn,
root->root, XCB_CW_BACK_PIXMAP, (uint32_t[]){
pixmap});
801 xcb_free_gc(
conn, gc);
805 #if defined(__OpenBSD__)
806 if (pledge(
"stdio rpath wpath cpath proc exec unix", NULL) == -1)
807 err(EXIT_FAILURE,
"pledge");
810 struct sigaction action;
813 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
814 sigemptyset(&action.sa_mask);
816 if (!disable_signalhandler)
820 if (sigaction(SIGQUIT, &action, NULL) == -1 ||
821 sigaction(SIGILL, &action, NULL) == -1 ||
822 sigaction(SIGABRT, &action, NULL) == -1 ||
823 sigaction(SIGFPE, &action, NULL) == -1 ||
824 sigaction(SIGSEGV, &action, NULL) == -1)
825 ELOG(
"Could not setup signal handler.\n");
829 if (sigaction(SIGHUP, &action, NULL) == -1 ||
830 sigaction(SIGINT, &action, NULL) == -1 ||
831 sigaction(SIGALRM, &action, NULL) == -1 ||
832 sigaction(SIGUSR1, &action, NULL) == -1 ||
833 sigaction(SIGUSR2, &action, NULL) == -1)
834 ELOG(
"Could not setup signal handler.\n");
838 signal(SIGPIPE, SIG_IGN);
858 LOG(
"auto-starting (always!) %s\n", exec_always->
command);
870 sasprintf(&command,
"%s --bar_id=%s --socket=\"%s\"",
873 LOG(
"Starting bar process: %s\n", command);
int ipc_recv_message(int sockfd, uint32_t *message_type, uint32_t *reply_length, uint8_t **reply)
Reads a message from the given socket file descriptor and stores its length (reply_length) as well as...
void display_running_version(void)
Connects to i3 to find out the currently running version.
void set_verbosity(bool _verbose)
Set verbosity of i3.
static void handle_signal(int sig, siginfo_t *info, void *data)
int main(int argc, char *argv[])
xcb_timestamp_t last_timestamp
The last timestamp we got from X11 (timestamps are included in some events and are used for some thin...
void con_focus(Con *con)
Sets input focus to the given container.
char * root_atom_contents(const char *atomname, xcb_connection_t *provided_conn, int screen)
Try to get the contents of the given atom (for example I3_SOCKET_PATH) from the X11 root window and r...
void * smalloc(size_t size)
Safe-wrapper around malloc which exits if malloc returns NULL (meaning that there is no more memory a...
static void xcb_prepare_cb(EV_P_ ev_prepare *w, int revents)
#define TAILQ_EMPTY(head)
Con * output_get_content(Con *output)
Returns the output container below the given output container.
struct bindings_head * bindings
struct autostarts_always_head autostarts_always
void tree_init(xcb_get_geometry_reply_t *geometry)
Initializes the tree by creating the root node, adding all RandR outputs to the tree (that means rand...
#define TAILQ_FOREACH(var, head, field)
const int default_shmlog_size
unsigned int xcb_numlock_mask
struct barconfig_head barconfigs
static struct ev_check * xcb_check
void * scalloc(size_t num, size_t size)
Safe-wrapper around calloc which exits if malloc returns NULL (meaning that there is no more memory a...
Con * con_descend_focused(Con *con)
Returns the focused con inside this client, descending the tree as far as possible.
bool is_debug_build() __attribute__((const ))
Returns true if this version of i3 is a debug build (anything which is not a release version)...
xcb_connection_t * conn
XCB connection and root screen.
void ewmh_update_current_desktop(void)
Updates _NET_CURRENT_DESKTOP with the current desktop number.
void tree_render(void)
Renders the tree, that is rendering all outputs using render_con() and pushing the changes to X11 usi...
void setup_signal_handler(void)
Setup signal handlers to safely handle SIGSEGV and SIGFPE.
void set_debug_logging(const bool _debug_logging)
Set debug logging.
static void i3_exit(void)
void ewmh_update_number_of_desktops(void)
Updates _NET_NUMBER_OF_DESKTOPS which we interpret as the number of noninternal workspaces.
void ewmh_setup_hints(void)
Set up the EWMH hints on the root window.
void x_set_i3_atoms(void)
Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
bool event_is_ignored(const int sequence, const int response_type)
Checks if the given sequence is ignored and returns true if so.
char * fake_outputs
Overwrites output detection (for testing), see src/fake_outputs.c.
void xinerama_init(void)
We have just established a connection to the X server and need the initial Xinerama information to se...
bool parse_configuration(const char *override_configpath, bool use_nagbar)
Finds the configuration file to use (either the one specified by override_configpath), the user’s one or the system default) and calls parse_file().
xcb_visualtype_t * visual_type
struct assignments_head assignments
Con * con
Pointer to the Con which represents this output.
void check_error(xcb_connection_t *conn, xcb_void_cookie_t cookie, char *err_message)
Checks a generic cookie for errors and quits with the given message if there was an error...
#define TAILQ_REMOVE(head, elm, field)
struct ws_assignments_head ws_assignments
void start_application(const char *command, bool no_startup_id)
Starts the given application by passing it through a shell.
void scratchpad_fix_resolution(void)
When starting i3 initially (and after each change to the connected outputs), this function fixes the ...
xcb_key_symbols_t * keysyms
static void xcb_got_event(EV_P_ struct ev_io *w, int revents)
#define SD_LISTEN_FDS_START
bool load_keymap(void)
Loads the XKB keymap from the X11 server and feeds it to xkbcommon.
int listen_fds
The number of file descriptors passed via socket activation.
Holds the status bar configuration (i3bar).
void init_logging(void)
Initializes logging by creating an error logfile in /tmp (or XDG_RUNTIME_DIR, see get_process_filenam...
bool no_startup_id
no_startup_id flag for start_application().
bool force_xinerama
By default, use the RandR API for multi-monitor setups.
Output * get_output_containing(unsigned int x, unsigned int y)
Returns the active (!) output which contains the coordinates x, y or NULL if there is no output which...
struct ev_loop * main_loop
void * srealloc(void *ptr, size_t size)
Safe-wrapper around realloc which exits if realloc returns NULL (meaning that there is no more memory...
static void xcb_check_cb(EV_P_ ev_check *w, int revents)
void ipc_new_client(EV_P_ struct ev_io *w, int revents)
Handler for activity on the listening socket, meaning that a new client has just connected and we sho...
void manage_existing_windows(xcb_window_t root)
Go through all existing windows (if the window manager is restarted) and manage them.
A 'Con' represents everything from the X11 root window down to a single X11 window.
static xcb_pixmap_t pixmap
#define TAILQ_FIRST(head)
void fake_outputs_init(const char *output_spec)
Creates outputs according to the given specification.
int sasprintf(char **strp, const char *fmt,...)
Safe-wrapper around asprintf which exits if it returns -1 (meaning that there is no more memory avail...
void restore_connect(void)
Opens a separate connection to X11 for placeholder windows when restoring layouts.
struct autostarts_head autostarts
int logical_px(const int logical)
Convert a logical amount of pixels (e.g.
void property_handlers_init(void)
Sets the appropriate atoms for the property handlers after the atoms were received from X11...
char * sstrdup(const char *str)
Safe-wrapper around strdup which exits if malloc returns NULL (meaning that there is no more memory a...
struct rlimit original_rlimit_core
The original value of RLIMIT_CORE when i3 was started.
xcb_screen_t * root_screen
int sd_listen_fds(int unset_environment)
Output * get_first_output(void)
Returns the first output which is active.
void handle_event(int type, xcb_generic_event_t *event)
Takes an xcb_generic_event_t and calls the appropriate handler, based on the event type...
void ewmh_update_workarea(void)
i3 currently does not support _NET_WORKAREA, because it does not correspond to i3’s concept of worksp...
char * command
Command, like in command mode.
char * get_process_filename(const char *prefix)
Returns the name of a temporary file with the specified prefix.
void grab_all_keys(xcb_connection_t *conn)
Grab the bound keys (tell X to send us keypress events for those keycodes)
struct reservedpx __attribute__
int ipc_create_socket(const char *filename)
Creates the UNIX domain socket at the given path, sets it to non-blocking mode, bind()s and listen()s...
void randr_init(int *event_base)
We have just established a connection to the X server and need the initial XRandR information to setu...
int ipc_send_message(int sockfd, const uint32_t message_size, const uint32_t message_type, const uint8_t *payload)
Formats a message (payload) of the given size and type and sends it to i3 via the given socket file d...
xcb_visualtype_t * get_visualtype(xcb_screen_t *screen)
Returns the visual type associated with the given screen.
An Output is a physical output on your graphics driver.
bool tree_restore(const char *path, xcb_get_geometry_reply_t *geometry)
Loads tree from ~/.i3/_restart.json (used for in-place restarts).
void xcb_set_root_cursor(int cursor)
Set the cursor of the root window to the given cursor id.
void load_configuration(xcb_connection_t *conn, const char *override_configpath, bool reload)
Reads the configuration from ~/.i3/config or /etc/i3/config if not found.
void translate_keysyms(void)
Translates keysymbols to keycodes for all bindings which use keysyms.
void ewmh_update_desktop_names(void)
Updates _NET_DESKTOP_NAMES: "The names of all virtual desktops.
const char * i3_version
Git commit identifier, from version.c.
void main_set_x11_cb(bool enable)
Enable or disable the main X11 event handling function.
void xcursor_load_cursors(void)
Holds a command specified by either an:
char * i3bar_command
Command that should be run to execute i3bar, give a full path if i3bar is not in your $PATH...
char * id
Automatically generated ID for this bar config.
void ewmh_update_desktop_viewport(void)
Updates _NET_DESKTOP_VIEWPORT, which is an array of pairs of cardinals that define the top left corne...
char * current_socketpath
#define TAILQ_HEAD_INITIALIZER(head)
uint32_t aio_get_mod_mask_for(uint32_t keysym, xcb_key_symbols_t *symbols)
All-in-one function which returns the modifier mask (XCB_MOD_MASK_*) for the given keysymbol...
void xcursor_set_root_cursor(int cursor_id)
Sets the cursor of the root window to the 'pointer' cursor.