Merge pull request #896 from thejan2009/bugfix/swaybar-whitespace-in-ws-name

Put workspace name in quotes (swaybar ipc)
This commit is contained in:
Drew DeVault 2016-09-12 14:41:07 +09:00 committed by GitHub
commit 953d6880c7
1 changed files with 2 additions and 2 deletions

View File

@ -7,10 +7,10 @@
#include "log.h"
void ipc_send_workspace_command(const char *workspace_name) {
uint32_t size = strlen("workspace ") + strlen(workspace_name) + 1;
uint32_t size = strlen("workspace \"\"") + strlen(workspace_name) + 1;
char command[size];
sprintf(command, "workspace %s", workspace_name);
sprintf(command, "workspace \"%s\"", workspace_name);
ipc_single_command(swaybar.ipc_socketfd, IPC_COMMAND, command, &size);
}