message_type = I3_IPC_MESSAGE_TYPE_GET_OUTPUTS;
else if (strcasecmp(optarg, "get_tree") == 0)
message_type = I3_IPC_MESSAGE_TYPE_GET_TREE;
+ else if (strcasecmp(optarg, "get_marks") == 0)
+ message_type = I3_IPC_MESSAGE_TYPE_GET_MARKS;
else {
printf("Unknown message type\n");
- printf("Known types: command, get_workspaces, get_outputs, get_tree\n");
+ printf("Known types: command, get_workspaces, get_outputs, get_tree, get_marks\n");
exit(EXIT_FAILURE);
}
} else if (o == 'q') {
uint32_t reply_length;
uint8_t *reply;
ipc_recv_message(sockfd, message_type, &reply_length, &reply);
- printf("%.*s", reply_length, reply);
+ printf("%.*s\n", reply_length, reply);
free(reply);
close(sockfd);