mirror of https://github.com/polybar/polybar.git
feat(alsa): add middle and right mouse button events (#2573)
* Add events to alsa module * Update CHANGELOG * Update CHANGELOG.md Closes #2566 Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
This commit is contained in:
parent
968d9c753f
commit
d995a39da8
|
@ -73,6 +73,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `DEBUG_SHADED` cmake variable and its associated functionality.
|
||||
|
||||
### Added
|
||||
- Right and middle click events for alsa module.
|
||||
([`#2566`](https://github.com/polybar/polybar/issues/2566))
|
||||
- `internal/network`: New token `%mac%` shows MAC address of selected interface
|
||||
([`#2568`](https://github.com/polybar/polybar/issues/2568))
|
||||
- Polybar can now read config files from stdin: `polybar -c /dev/stdin`.
|
||||
|
|
|
@ -196,6 +196,17 @@ namespace modules {
|
|||
string output{module::get_output()};
|
||||
|
||||
if (m_handle_events) {
|
||||
auto click_middle = m_conf.get(name(), "click-middle", ""s);
|
||||
auto click_right = m_conf.get(name(), "click-right", ""s);
|
||||
|
||||
if (!click_middle.empty()) {
|
||||
m_builder->action(mousebtn::MIDDLE, click_middle);
|
||||
}
|
||||
|
||||
if (!click_right.empty()) {
|
||||
m_builder->action(mousebtn::RIGHT, click_right);
|
||||
}
|
||||
|
||||
m_builder->action(mousebtn::LEFT, *this, EVENT_TOGGLE, "");
|
||||
m_builder->action(mousebtn::SCROLL_UP, *this, EVENT_INC, "");
|
||||
m_builder->action(mousebtn::SCROLL_DOWN, *this, EVENT_DEC, "");
|
||||
|
|
Loading…
Reference in New Issue