MCPcopy Create free account
hub / github.com/Alexays/Waybar / onButtonReady

Method onButtonReady

src/modules/sway/workspaces.cpp:523–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521}
522
523void Workspaces::onButtonReady(const Json::Value& node, Gtk::Button& button) {
524 if (config_["current-only"].asBool()) {
525 if (is_focused_recursive(node)) {
526 button.show();
527 } else {
528 button.hide();
529 }
530 } else {
531 button.show();
532 }
533}
534
535} // namespace waybar::modules::sway

Callers

nothing calls this directly

Calls 3

is_focused_recursiveFunction · 0.85
showMethod · 0.80
hideMethod · 0.80

Tested by

no test coverage detected