style(bluetooth): apply project style

pull/1576/head
Daan Goossens 2022-05-28 12:58:37 +02:00
parent a475be7cf7
commit 6857691679
1 changed files with 6 additions and 8 deletions

View File

@ -152,7 +152,8 @@ auto waybar::modules::Bluetooth::update() -> void {
#ifdef WANT_RFKILL #ifdef WANT_RFKILL
if (rfkill_.getState()) state = "disabled"; if (rfkill_.getState()) state = "disabled";
#endif #endif
bool battery_available = state == "connected" && cur_focussed_device_.battery_percentage.has_value(); bool battery_available =
state == "connected" && cur_focussed_device_.battery_percentage.has_value();
#ifdef WANT_RFKILL #ifdef WANT_RFKILL
// also adds enabled icon if icon for state is not defined // also adds enabled icon if icon for state is not defined
@ -210,8 +211,7 @@ auto waybar::modules::Bluetooth::update() -> void {
fmt::arg("controller_alias", cur_controller_.alias), fmt::arg("controller_alias", cur_controller_.alias),
fmt::arg("device_address", cur_focussed_device_.address), fmt::arg("device_address", cur_focussed_device_.address),
fmt::arg("device_address_type", cur_focussed_device_.address_type), fmt::arg("device_address_type", cur_focussed_device_.address_type),
fmt::arg("device_alias", cur_focussed_device_.alias), fmt::arg("device_alias", cur_focussed_device_.alias), fmt::arg("icon", icon_label),
fmt::arg("icon", icon_label),
fmt::arg("device_battery_percentage", cur_focussed_device_.battery_percentage.value_or(0)))); fmt::arg("device_battery_percentage", cur_focussed_device_.battery_percentage.value_or(0))));
if (tooltipEnabled()) { if (tooltipEnabled()) {
@ -235,8 +235,7 @@ auto waybar::modules::Bluetooth::update() -> void {
ss << fmt::format( ss << fmt::format(
enumerate_format, fmt::arg("device_address", dev.address), enumerate_format, fmt::arg("device_address", dev.address),
fmt::arg("device_address_type", dev.address_type), fmt::arg("device_address_type", dev.address_type),
fmt::arg("device_alias", dev.alias), fmt::arg("device_alias", dev.alias), fmt::arg("icon", enumerate_icon),
fmt::arg("icon", enumerate_icon),
fmt::arg("device_battery_percentage", dev.battery_percentage.value_or(0))); fmt::arg("device_battery_percentage", dev.battery_percentage.value_or(0)));
} }
} }
@ -254,8 +253,7 @@ auto waybar::modules::Bluetooth::update() -> void {
fmt::arg("controller_alias", cur_controller_.alias), fmt::arg("controller_alias", cur_controller_.alias),
fmt::arg("device_address", cur_focussed_device_.address), fmt::arg("device_address", cur_focussed_device_.address),
fmt::arg("device_address_type", cur_focussed_device_.address_type), fmt::arg("device_address_type", cur_focussed_device_.address_type),
fmt::arg("device_alias", cur_focussed_device_.alias), fmt::arg("device_alias", cur_focussed_device_.alias), fmt::arg("icon", icon_tooltip),
fmt::arg("icon", icon_tooltip),
fmt::arg("device_battery_percentage", cur_focussed_device_.battery_percentage.value_or(0)), fmt::arg("device_battery_percentage", cur_focussed_device_.battery_percentage.value_or(0)),
fmt::arg("device_enumerate", device_enumerate_))); fmt::arg("device_enumerate", device_enumerate_)));
} }