modules/power_profiles_daemon: add custom format from config

We move to a single icon label format to save space on the bar. We
still display the profile name and the driver in the tooltip.
This commit is contained in:
Félix Baylac Jacqué
2024-03-01 11:13:57 +01:00
parent 162b41c4d0
commit 61fed6a214
3 changed files with 30 additions and 2 deletions

View File

@ -32,6 +32,9 @@ class PowerProfilesDaemon : public ALabel {
std::vector<Profile>::iterator activeProfile_;
// Current CSS class applied to the label
std::string currentStyle_;
// Format strings
std::string labelFormat_;
std::string tooltipFormat_;
// DBus Proxy used to track the current active profile
Glib::RefPtr<Gio::DBus::Proxy> powerProfilesProxy_;
sigc::connection powerProfileChangeSignal_;