diff --git a/src/modules/sway/ipc/client.cpp b/src/modules/sway/ipc/client.cpp index ac9be062..567df09a 100644 --- a/src/modules/sway/ipc/client.cpp +++ b/src/modules/sway/ipc/client.cpp @@ -122,7 +122,7 @@ struct waybar::modules::sway::Ipc::ipc_response void waybar::modules::sway::Ipc::subscribe(const std::string& payload) const { auto res = send(fd_event_, IPC_SUBSCRIBE, payload); - if (res.payload != "{\"success\": true}") { + if (res.payload != "{\"success\": true}" && res.payload != "[{\"success\": true}]") { throw std::runtime_error("Unable to subscribe ipc event"); } } @@ -131,4 +131,4 @@ struct waybar::modules::sway::Ipc::ipc_response waybar::modules::sway::Ipc::handleEvent() const { return recv(fd_event_); -} \ No newline at end of file +}