refactor: format code

This commit is contained in:
Alex
2019-04-18 17:52:00 +02:00
parent 807ef32357
commit 6ed8f94dab
47 changed files with 871 additions and 960 deletions

View File

@ -1,8 +1,7 @@
#include "modules/sway/mode.hpp"
waybar::modules::sway::Mode::Mode(const std::string& id, const Bar& bar, const Json::Value& config)
: ALabel(config, "{}"), bar_(bar)
{
: ALabel(config, "{}"), bar_(bar) {
label_.set_name("mode");
if (!id.empty()) {
label_.get_style_context()->add_class(id);
@ -13,8 +12,7 @@ waybar::modules::sway::Mode::Mode(const std::string& id, const Bar& bar, const J
dp.emit();
}
void waybar::modules::sway::Mode::worker()
{
void waybar::modules::sway::Mode::worker() {
thread_ = [this] {
try {
auto res = ipc_.handleEvent();
@ -31,8 +29,7 @@ void waybar::modules::sway::Mode::worker()
};
}
auto waybar::modules::sway::Mode::update() -> void
{
auto waybar::modules::sway::Mode::update() -> void {
if (mode_.empty()) {
event_box_.hide();
} else {