diff --git a/include/modules/upower/upower.hpp b/include/modules/upower/upower.hpp index 2724443f..e19315f8 100644 --- a/include/modules/upower/upower.hpp +++ b/include/modules/upower/upower.hpp @@ -8,6 +8,7 @@ #include #include "ALabel.hpp" +#include "AButton.hpp" #include "glibconfig.h" #include "gtkmm/box.h" #include "gtkmm/image.h" diff --git a/man/waybar-upower.5.scd b/man/waybar-upower.5.scd index dae974dd..a6ba4df0 100644 --- a/man/waybar-upower.5.scd +++ b/man/waybar-upower.5.scd @@ -47,6 +47,10 @@ compatible devices in the tooltip. default: 4 ++ Defines the spacing between the tooltip window edge and the tooltip content. +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + # FORMAT REPLACEMENTS *{percentage}*: The battery capacity in percentage diff --git a/src/modules/upower/upower.cpp b/src/modules/upower/upower.cpp index 41fc362b..6b8a2029 100644 --- a/src/modules/upower/upower.cpp +++ b/src/modules/upower/upower.cpp @@ -250,10 +250,7 @@ const std::string UPower::getDeviceStatus(UpDeviceState& state) { } bool UPower::handleToggle(GdkEventButton* const& event) { - std::lock_guard guard(m_Mutex); - showAltText = !showAltText; - dp.emit(); - return true; + return AModule::handleToggle(event); } std::string UPower::timeToString(gint64 time) {