mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 15:36:29 +01:00
Send command to sway to change workspace when workspace button is clicked
This commit is contained in:
parent
a0c8799c80
commit
8a232c8cfd
1 changed files with 6 additions and 1 deletions
|
@ -8,7 +8,12 @@
|
|||
#include "bar/ipc.h"
|
||||
|
||||
void ipc_send_workspace_command(const char *workspace_name) {
|
||||
sway_log(L_DEBUG, "Clicked on window %s", workspace_name);
|
||||
uint32_t size = strlen("workspace ") + strlen(workspace_name) + 1;
|
||||
|
||||
char command[size];
|
||||
sprintf(command, "workspace %s", workspace_name);
|
||||
|
||||
ipc_single_command(swaybar.ipc_socketfd, IPC_COMMAND, command, &size);
|
||||
}
|
||||
|
||||
static void ipc_parse_config(struct config *config, const char *payload) {
|
||||
|
|
Loading…
Reference in a new issue