summaryrefslogtreecommitdiffstats
path: root/swaybar/ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar/ipc.c')
-rw-r--r--swaybar/ipc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index 6697742e..15f40508 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -8,7 +8,12 @@
8#include "bar/ipc.h" 8#include "bar/ipc.h"
9 9
10void ipc_send_workspace_command(const char *workspace_name) { 10void ipc_send_workspace_command(const char *workspace_name) {
11 sway_log(L_DEBUG, "Clicked on window %s", workspace_name); 11 uint32_t size = strlen("workspace ") + strlen(workspace_name) + 1;
12
13 char command[size];
14 sprintf(command, "workspace %s", workspace_name);
15
16 ipc_single_command(swaybar.ipc_socketfd, IPC_COMMAND, command, &size);
12} 17}
13 18
14static void ipc_parse_config(struct config *config, const char *payload) { 19static void ipc_parse_config(struct config *config, const char *payload) {