feat(custom): Add format-icons to custom module

This commit allows custom modules (json only) to set a percentage. This can be displayed either by using {percentage} or by using {icon} with format-icons set.
This commit is contained in:
Robinhuett
2018-12-26 03:52:05 +01:00
parent 76bbdd0425
commit 11c98f13e3
2 changed files with 23 additions and 1 deletions

View File

@ -19,12 +19,14 @@ class Custom : public ALabel {
void continuousWorker();
void parseOutputRaw();
void parseOutputJson();
bool isInteger(const std::string&);
const std::string name_;
std::string text_;
std::string tooltip_;
std::string class_;
std::string prevclass_;
int percentage_;
waybar::util::SleeperThread thread_;
waybar::util::command::res output_;
waybar::util::JsonParser parser_;