Hi Kevin,
Kevin Murphy <kemurphy.cmu@xxxxxxxxx> writes:
+/** Request the id and title of the focused window */I’d prefer this to be "GET_FOCUSED", just because getting the x11 focus
+#define I3_IPC_MESSAGE_TYPE_GET_FOCUS 8
+ ipc_send_event("focus", I3_IPC_EVENT_FOCUS,Is there a reason why you don’t include the properties you send in
"{\"change\":\"window\"}");
+ if (con == focused)Same here.
+ ipc_send_event("focus", I3_IPC_EVENT_FOCUS,
"{\"change\":\"title\"}");
+ y(map_open);Is there a reason to not use dump_node? Actually, is there a reason to
+
+ ystr("id");
+ if (focused->window != NULL) {
+ y(integer, focused->window->id);
+ } else {
+ y(integer, focused->frame);
+ }
+
+ ystr("title");
+ if (focused->window && focused->window->name)
+ ystr(i3string_as_utf8(focused->window->name));
+ else if (focused->type != CT_WORKSPACE && focused->name)
+ ystr(focused->name);
+ else
+ ystr("");
+
+ y(map_close);