|
|
@ -356,8 +356,12 @@ bool ipc_initialize(struct swaybar *bar) {
|
|
|
|
free(res);
|
|
|
|
free(res);
|
|
|
|
ipc_get_outputs(bar);
|
|
|
|
ipc_get_outputs(bar);
|
|
|
|
|
|
|
|
|
|
|
|
const char *subscribe = "[ \"workspace\", \"mode\" ]";
|
|
|
|
struct swaybar_config *config = bar->config;
|
|
|
|
len = strlen(subscribe);
|
|
|
|
char subscribe[128]; // suitably large buffer
|
|
|
|
|
|
|
|
len = snprintf(subscribe, 128,
|
|
|
|
|
|
|
|
"[ \"barconfig_update\" %s %s ]",
|
|
|
|
|
|
|
|
config->binding_mode_indicator ? ", \"mode\"" : "",
|
|
|
|
|
|
|
|
config->workspace_buttons ? ", \"workspace\"" : "");
|
|
|
|
free(ipc_single_command(bar->ipc_event_socketfd,
|
|
|
|
free(ipc_single_command(bar->ipc_event_socketfd,
|
|
|
|
IPC_SUBSCRIBE, subscribe, &len));
|
|
|
|
IPC_SUBSCRIBE, subscribe, &len));
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|