mirror of https://github.com/polybar/polybar.git
fix(pulse): Use distinct event names
volup, voldow, volmute, are caught by the alsa module, if there is an alsa module on the bar.
This commit is contained in:
parent
d007539a6b
commit
3ea60ace91
|
@ -35,10 +35,10 @@ namespace modules {
|
|||
static constexpr auto TAG_LABEL_VOLUME = "<label-volume>";
|
||||
static constexpr auto TAG_LABEL_MUTED = "<label-muted>";
|
||||
|
||||
static constexpr auto EVENT_PREFIX = "vol";
|
||||
static constexpr auto EVENT_VOLUME_UP = "volup";
|
||||
static constexpr auto EVENT_VOLUME_DOWN = "voldown";
|
||||
static constexpr auto EVENT_TOGGLE_MUTE = "volmute";
|
||||
static constexpr auto EVENT_PREFIX = "pa_vol";
|
||||
static constexpr auto EVENT_VOLUME_UP = "pa_volup";
|
||||
static constexpr auto EVENT_VOLUME_DOWN = "pa_voldown";
|
||||
static constexpr auto EVENT_TOGGLE_MUTE = "pa_volmute";
|
||||
|
||||
progressbar_t m_bar_volume;
|
||||
ramp_t m_ramp_volume;
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace modules {
|
|||
bool pulseaudio_module::input(string&& cmd) {
|
||||
if (!m_handle_events) {
|
||||
return false;
|
||||
} else if (cmd.compare(0, 3, EVENT_PREFIX) != 0) {
|
||||
} else if (cmd.compare(0, strlen(EVENT_PREFIX), EVENT_PREFIX) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue