Skip to content

Commit

Permalink
Merge pull request #1518 from towoe/bluetooth-format
Browse files Browse the repository at this point in the history
Add disabled bluetooth style
  • Loading branch information
Alexays authored Apr 12, 2022
2 parents 503fe9a + e8b022c commit d87cf8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions man/waybar-bluetooth.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ Addressed by *bluetooth*
# STYLE

- *#bluetooth*
- *#bluetooth.disabled*
5 changes: 5 additions & 0 deletions src/modules/bluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ auto waybar::modules::Bluetooth::update() -> void {

label_.set_markup(
fmt::format(format_, fmt::arg("status", status), fmt::arg("icon", getIcon(0, status))));
if (status == "disabled") {
label_.get_style_context()->add_class("disabled");
} else {
label_.get_style_context()->remove_class("disabled");
}

if (tooltipEnabled()) {
if (config_["tooltip-format"].isString()) {
Expand Down

0 comments on commit d87cf8a

Please sign in to comment.