]> git.sur5r.net Git - i3/i3/commitdiff
Support get_workspaces and get_outputs in i3-msg.
authorFernando Tarlá Cardoso Lemos <fernandotcl@gmail.com>
Sat, 20 Nov 2010 21:50:24 +0000 (19:50 -0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 21 Nov 2010 20:36:25 +0000 (21:36 +0100)
i3-msg/main.c

index 0dc1165a1e8b9b310628e636a5fb382a70cb4df1..295fe68334206aad0a4ad6311278abfcf51468e9 100644 (file)
@@ -130,6 +130,10 @@ int main(int argc, char *argv[]) {
                 } else if (o == 't') {
                         if (strcasecmp(optarg, "command") == 0)
                                 message_type = I3_IPC_MESSAGE_TYPE_COMMAND;
+                        else if (strcasecmp(optarg, "get_workspaces") == 0)
+                                message_type = I3_IPC_MESSAGE_TYPE_GET_WORKSPACES;
+                        else if (strcasecmp(optarg, "get_outputs") == 0)
+                                message_type = I3_IPC_MESSAGE_TYPE_GET_OUTPUTS;
                         else if (strcasecmp(optarg, "tree") == 0)
                                 message_type = I3_IPC_MESSAGE_TYPE_GET_TREE;
                         else {
@@ -140,10 +144,10 @@ int main(int argc, char *argv[]) {
                 } else if (o == 'q') {
                         quiet = true;
                 } else if (o == 'v') {
-                        printf("i3-msg " I3_VERSION);
+                        printf("i3-msg " I3_VERSION "\n");
                         return 0;
                 } else if (o == 'h') {
-                        printf("i3-msg " I3_VERSION);
+                        printf("i3-msg " I3_VERSION "\n");
                         printf("i3-msg [-s <socket>] [-t <type>] <message>\n");
                         return 0;
                 }