From c0cd756b0fdf22f472fe8ba92f2ee7dd42f00580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Tarl=C3=A1=20Cardoso=20Lemos?= Date: Sat, 20 Nov 2010 19:50:24 -0200 Subject: [PATCH] Support get_workspaces and get_outputs in i3-msg. --- i3-msg/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/i3-msg/main.c b/i3-msg/main.c index 0dc1165a..295fe683 100644 --- a/i3-msg/main.c +++ b/i3-msg/main.c @@ -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 ] [-t ] \n"); return 0; }