output (1)::
Sent when RandR issues a change notification (of either screens,
outputs, CRTCs or output properties).
+mode (2)::
+ Sent whenever i3 changes its binding mode.
*Example:*
--------------------------------------------------------------------
{ "change": "unspecified" }
---------------------------
+=== mode event
+
+This event consists of a single serialized map containing a property
++change (string)+ which holds the name of current mode in use. The name
+is the same as specified in config when creating a mode. The default
+mode is simply named default.
+
+*Example:*
+---------------------------
+{ "change": "default" }
+---------------------------
+
== See also
For some languages, libraries are available (so you don’t have to implement
/* The output event will be triggered upon changes in the output list */
#define I3_IPC_EVENT_OUTPUT (I3_IPC_EVENT_MASK | 1)
+/* The output event will be triggered upon mode changes */
+#define I3_IPC_EVENT_MODE (I3_IPC_EVENT_MASK | 2)
+
#endif
bindings = mode->bindings;
translate_keysyms();
grab_all_keys(conn, false);
+
+ char *event_msg;
+ sasprintf(&event_msg, "{\"change\":\"%s\"}", mode->name);
+
+ ipc_send_event("mode", I3_IPC_EVENT_MODE, event_msg);
+ FREE(event_msg);
+
return;
}