refactor(modules): Handle events using signal_receiver
This commit is contained in:
parent
c01f111e34
commit
7979f5b3d4
26 changed files with 176 additions and 161 deletions
src/modules
|
@ -318,7 +318,9 @@ namespace modules {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool mpd_module::handle_event(string cmd) {
|
||||
bool mpd_module::on(const input_event_t& evt) {
|
||||
string cmd{*evt.data()};
|
||||
|
||||
if (cmd.compare(0, 3, "mpd") != 0) {
|
||||
return false;
|
||||
}
|
||||
|
@ -369,10 +371,6 @@ namespace modules {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool mpd_module::receive_events() const {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
POLYBAR_NS_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue