X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=i3-msg%2Fmain.c;h=607c5269b2f52a406132cedbcd5dbf1eefd1cb30;hb=71ccb4bef2850bd5beab8a4ef4669bf53b5a9781;hp=5bc35b880cb64cd78aa56a577021f6c2c34dd2d5;hpb=29fb09ae74e49744f29793fdae5221f8cad39361;p=i3%2Fi3 diff --git a/i3-msg/main.c b/i3-msg/main.c index 5bc35b88..607c5269 100644 --- a/i3-msg/main.c +++ b/i3-msg/main.c @@ -2,10 +2,7 @@ * vim:ts=4:sw=4:expandtab * * i3 - an improved dynamic tiling window manager - * - * © 2009-2010 Michael Stapelberg and contributors - * - * See file LICENSE for license information. + * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE) * * i3-msg/main.c: Utility which sends messages to a running i3-instance using * IPC via UNIX domain sockets. @@ -17,7 +14,6 @@ * Additionally, it’s even useful sometimes :-). * */ -#include #include #include #include @@ -74,9 +70,13 @@ int main(int argc, char *argv[]) { message_type = I3_IPC_MESSAGE_TYPE_GET_TREE; else if (strcasecmp(optarg, "get_marks") == 0) message_type = I3_IPC_MESSAGE_TYPE_GET_MARKS; + else if (strcasecmp(optarg, "get_bar_config") == 0) + message_type = I3_IPC_MESSAGE_TYPE_GET_BAR_CONFIG; + else if (strcasecmp(optarg, "get_version") == 0) + message_type = I3_IPC_MESSAGE_TYPE_GET_VERSION; else { printf("Unknown message type\n"); - printf("Known types: command, get_workspaces, get_outputs, get_tree, get_marks\n"); + printf("Known types: command, get_workspaces, get_outputs, get_tree, get_marks, get_bar_config, get_version\n"); exit(EXIT_FAILURE); } } else if (o == 'q') { @@ -92,7 +92,7 @@ int main(int argc, char *argv[]) { } if (socket_path == NULL) - socket_path = socket_path_from_x11(); + socket_path = root_atom_contents("I3_SOCKET_PATH"); /* Fall back to the default socket path */ if (socket_path == NULL)