Merge branch 'master' into master

This commit is contained in:
Marc Radau
2020-04-16 14:43:10 +02:00
committed by GitHub
43 changed files with 142 additions and 35 deletions

View File

@ -187,6 +187,8 @@ auto waybar::modules::Backlight::update() -> void {
}
previous_best_ = best == nullptr ? std::nullopt : std::optional{*best};
previous_format_ = format_;
// Call parent update
ALabel::update();
}
template <class ForwardIt>

View File

@ -202,4 +202,6 @@ auto waybar::modules::Battery::update() -> void {
fmt::arg("icon", getIcon(capacity, state)),
fmt::arg("time", formatTimeRemaining(time_remaining))));
}
// Call parent update
ALabel::update();
}

View File

@ -54,6 +54,8 @@ auto waybar::modules::Clock::update() -> void {
label_.set_tooltip_markup(text);
}
}
// Call parent update
ALabel::update();
}
auto waybar::modules::Clock::calendar_text(const waybar_time& wtime) -> std::string {

View File

@ -18,6 +18,8 @@ auto waybar::modules::Cpu::update() -> void {
}
label_.set_markup(fmt::format(format_, fmt::arg("load", cpu_load), fmt::arg("usage", cpu_usage)));
getState(cpu_usage);
// Call parent update
ALabel::update();
}
uint16_t waybar::modules::Cpu::getCpuLoad() {

View File

@ -141,6 +141,8 @@ auto waybar::modules::Custom::update() -> void {
event_box_.show();
}
}
// Call parent update
ALabel::update();
}
void waybar::modules::Custom::parseOutputRaw() {

View File

@ -73,4 +73,6 @@ auto waybar::modules::Disk::update() -> void {
));
}
event_box_.show();
// Call parent update
ALabel::update();
}

View File

@ -32,6 +32,8 @@ auto waybar::modules::IdleInhibitor::update() -> void {
if (tooltipEnabled()) {
label_.set_tooltip_text(status_);
}
// Call parent update
ALabel::update();
}
bool waybar::modules::IdleInhibitor::handleToggle(GdkEventButton* const& e) {

View File

@ -42,6 +42,8 @@ auto waybar::modules::Memory::update() -> void {
} else {
event_box_.hide();
}
// Call parent update
ALabel::update();
}
void waybar::modules::Memory::parseMeminfo() {

View File

@ -56,6 +56,9 @@ auto waybar::modules::MPD::update() -> void {
}
setLabel();
// Call parent update
ALabel::update();
}
std::thread waybar::modules::MPD::event_listener() {

View File

@ -331,6 +331,9 @@ auto waybar::modules::Network::update() -> void {
label_.set_tooltip_text(text);
}
}
// Call parent update
ALabel::update();
}
// Based on https://gist.github.com/Yawning/c70d804d4b8ae78cc698

View File

@ -245,4 +245,7 @@ auto waybar::modules::Pulseaudio::update() -> void {
if (tooltipEnabled()) {
label_.set_tooltip_text(desc_);
}
// Call parent update
ALabel::update();
}

View File

@ -40,6 +40,8 @@ auto Tray::update() -> void {
} else {
box_.show_all();
}
// Call parent update
AModule::update();
}
} // namespace waybar::modules::SNI

View File

@ -47,6 +47,8 @@ auto Mode::update() -> void {
}
event_box_.show();
}
// Call parent update
ALabel::update();
}
} // namespace waybar::modules::sway

View File

@ -60,6 +60,8 @@ auto Window::update() -> void {
if (tooltipEnabled()) {
label_.set_tooltip_text(window_);
}
// Call parent update
ALabel::update();
}
std::tuple<std::size_t, int, std::string, std::string> Window::getFocusedNode(

View File

@ -157,12 +157,13 @@ auto Workspaces::update() -> void {
if (needReorder) {
box_.reorder_child(button, it - workspaces_.begin());
}
std::string output = getIcon((*it)["name"].asString(), *it);
std::string output = (*it)["name"].asString();
if (config_["format"].isString()) {
auto format = config_["format"].asString();
output = fmt::format(format,
fmt::arg("icon", output),
fmt::arg("name", trimWorkspaceName((*it)["name"].asString())),
fmt::arg("icon", getIcon(output, *it)),
fmt::arg("value", output),
fmt::arg("name", trimWorkspaceName(output)),
fmt::arg("index", (*it)["num"].asString()));
}
if (!config_["disable-markup"].asBool()) {
@ -172,6 +173,8 @@ auto Workspaces::update() -> void {
}
onButtonReady(*it, button);
}
// Call parent update
AModule::update();
}
Gtk::Button &Workspaces::addButton(const Json::Value &node) {

View File

@ -36,6 +36,8 @@ auto waybar::modules::Temperature::update() -> void {
fmt::arg("temperatureC", temperature_c),
fmt::arg("temperatureF", temperature_f),
fmt::arg("icon", getIcon(temperature_c, "", max_temp))));
// Call parent update
ALabel::update();
}
std::tuple<uint16_t, uint16_t> waybar::modules::Temperature::getTemperature() {