mirror of
https://github.com/polybar/polybar.git
synced 2026-03-17 05:37:49 +00:00
refactor(modules): Handle events using signal_receiver
This commit is contained in:
@ -211,7 +211,9 @@ namespace modules {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool volume_module::handle_event(string cmd) {
|
||||
bool volume_module::on(const input_event_t& evt) {
|
||||
string cmd{*evt.data()};
|
||||
|
||||
if (cmd.compare(0, 3, EVENT_PREFIX) != 0) {
|
||||
return false;
|
||||
}
|
||||
@ -263,10 +265,6 @@ namespace modules {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool volume_module::receive_events() const {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
POLYBAR_NS_END
|
||||
|
||||
Reference in New Issue
Block a user