mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
added onclick to upower
This commit is contained in:
parent
833dcc1bb8
commit
00a2ebf00d
@ -8,6 +8,7 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "ALabel.hpp"
|
#include "ALabel.hpp"
|
||||||
|
#include "AButton.hpp"
|
||||||
#include "glibconfig.h"
|
#include "glibconfig.h"
|
||||||
#include "gtkmm/box.h"
|
#include "gtkmm/box.h"
|
||||||
#include "gtkmm/image.h"
|
#include "gtkmm/image.h"
|
||||||
|
@ -47,6 +47,10 @@ compatible devices in the tooltip.
|
|||||||
default: 4 ++
|
default: 4 ++
|
||||||
Defines the spacing between the tooltip window edge and the tooltip content.
|
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
|
# FORMAT REPLACEMENTS
|
||||||
|
|
||||||
*{percentage}*: The battery capacity in percentage
|
*{percentage}*: The battery capacity in percentage
|
||||||
|
@ -250,10 +250,7 @@ const std::string UPower::getDeviceStatus(UpDeviceState& state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool UPower::handleToggle(GdkEventButton* const& event) {
|
bool UPower::handleToggle(GdkEventButton* const& event) {
|
||||||
std::lock_guard<std::mutex> guard(m_Mutex);
|
return AModule::handleToggle(event);
|
||||||
showAltText = !showAltText;
|
|
||||||
dp.emit();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string UPower::timeToString(gint64 time) {
|
std::string UPower::timeToString(gint64 time) {
|
||||||
|
Loading…
Reference in New Issue
Block a user