mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 14:42:29 +02:00
Merge pull request #3034 from wispl/master
Add empty workspace style for Sway
This commit is contained in:
@ -182,5 +182,6 @@ n.b.: the list of outputs can be obtained from command line using *swaymsg -t ge
|
|||||||
- *#workspaces button.focused*
|
- *#workspaces button.focused*
|
||||||
- *#workspaces button.urgent*
|
- *#workspaces button.urgent*
|
||||||
- *#workspaces button.persistent*
|
- *#workspaces button.persistent*
|
||||||
|
- *#workspaces button.empty*
|
||||||
- *#workspaces button.current_output*
|
- *#workspaces button.current_output*
|
||||||
- *#workspaces button#sway-workspace-${name}*
|
- *#workspaces button#sway-workspace-${name}*
|
||||||
|
@ -319,6 +319,11 @@ auto Workspaces::update() -> void {
|
|||||||
} else {
|
} else {
|
||||||
button.get_style_context()->remove_class("persistent");
|
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"].isString()) {
|
||||||
if (((*it)["output"].asString()) == bar_.output->name) {
|
if (((*it)["output"].asString()) == bar_.output->name) {
|
||||||
button.get_style_context()->add_class("current_output");
|
button.get_style_context()->add_class("current_output");
|
||||||
|
Reference in New Issue
Block a user