From cf3389e5d736825b9abb075d5f13e71474cc709f Mon Sep 17 00:00:00 2001 From: wispl Date: Mon, 18 Mar 2024 19:37:09 -0400 Subject: [PATCH] Add empty workspace style for Sway --- src/modules/sway/workspaces.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/sway/workspaces.cpp b/src/modules/sway/workspaces.cpp index 0c9b554f..0f85feed 100644 --- a/src/modules/sway/workspaces.cpp +++ b/src/modules/sway/workspaces.cpp @@ -322,6 +322,11 @@ auto Workspaces::update() -> void { } else { button.get_style_context()->remove_class("persistent"); } + if ((*it)["nodes"].size() == 0) { + button.get_style_context()->add_class("empty"); + } else { + button.get_style_context()->remove_class("empty"); + } if ((*it)["output"].isString()) { if (((*it)["output"].asString()) == bar_.output->name) { button.get_style_context()->add_class("current_output");