diff options
author | 2016-07-14 18:57:37 -0400 | |
---|---|---|
committer | 2016-07-14 18:57:37 -0400 | |
commit | 6abbe04e7590f3bfba13351eb87ada70ac3d506e (patch) | |
tree | f7c64d6e9d082bd080960c42e21e54edf01839de /swaybar/ipc.c | |
parent | Merge pull request #726 from Hummer12007/hwc (diff) | |
parent | Send command to sway to change workspace when workspace button is clicked (diff) | |
download | sway-6abbe04e7590f3bfba13351eb87ada70ac3d506e.tar.gz sway-6abbe04e7590f3bfba13351eb87ada70ac3d506e.tar.zst sway-6abbe04e7590f3bfba13351eb87ada70ac3d506e.zip |
Merge pull request #743 from deklov/panel-as-shell-03
Set panels/backgrounds' geometries correctly and don't render them ex…
Diffstat (limited to 'swaybar/ipc.c')
-rw-r--r-- | swaybar/ipc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c index dacee4c2..15f40508 100644 --- a/swaybar/ipc.c +++ b/swaybar/ipc.c | |||
@@ -7,6 +7,15 @@ | |||
7 | #include "bar/config.h" | 7 | #include "bar/config.h" |
8 | #include "bar/ipc.h" | 8 | #include "bar/ipc.h" |
9 | 9 | ||
10 | void ipc_send_workspace_command(const char *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); | ||
17 | } | ||
18 | |||
10 | static void ipc_parse_config(struct config *config, const char *payload) { | 19 | static void ipc_parse_config(struct config *config, const char *payload) { |
11 | json_object *bar_config = json_tokener_parse(payload); | 20 | json_object *bar_config = json_tokener_parse(payload); |
12 | json_object *tray_output, *mode, *hidden_bar, *position, *status_command; | 21 | json_object *tray_output, *mode, *hidden_bar, *position, *status_command; |