Support get_workspaces and get_outputs in i3-msg.

This commit is contained in:
Fernando Tarlá Cardoso Lemos 2010-11-20 19:50:24 -02:00 committed by Michael Stapelberg
parent 5d830e7a27
commit c0cd756b0f
1 changed files with 6 additions and 2 deletions

View 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;
}