From 3a5a470d9027bf663549f8d33fdd02c3e7b9defa Mon Sep 17 00:00:00 2001 From: Ryan Walklin Date: Wed, 28 Nov 2018 22:27:06 +0000 Subject: [PATCH] Update to new Sway IPC protocol --- src/modules/sway/ipc/client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/sway/ipc/client.cpp b/src/modules/sway/ipc/client.cpp index ac9be06..567df09 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 +}