add reverse-scroll option for xworkspaces module (#2365)
* add reverse-scroll option for xworkspaces module * move use of reverse-scroll option to when producing scroll action * documented xworkspaces reverse-scroll option in changelog
This commit is contained in:
parent
4ded401aab
commit
c676d7e6f5
@ -50,6 +50,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
repository.
|
||||
|
||||
### Added
|
||||
- `internal/xworkspaces`: `reverse-scroll` can be used to reverse the scroll
|
||||
direction when cycling through desktops.
|
||||
- The backslash escape character (\\).
|
||||
[`#2354`](https://github.com/polybar/polybar/issues/2354)
|
||||
- Warn states for the cpu, memory, fs, and battery modules.
|
||||
|
@ -112,6 +112,7 @@ namespace modules {
|
||||
bool m_pinworkspaces{false};
|
||||
bool m_click{true};
|
||||
bool m_scroll{true};
|
||||
bool m_revscroll{false};
|
||||
size_t m_index{0};
|
||||
|
||||
// The following mutex is here to protect the data of this modules.
|
||||
|
@ -43,6 +43,7 @@ namespace modules {
|
||||
m_pinworkspaces = m_conf.get(name(), "pin-workspaces", m_pinworkspaces);
|
||||
m_click = m_conf.get(name(), "enable-click", m_click);
|
||||
m_scroll = m_conf.get(name(), "enable-scroll", m_scroll);
|
||||
m_revscroll = m_conf.get(name(), "reverse-scroll", m_revscroll);
|
||||
|
||||
// Initialize ewmh atoms
|
||||
if ((m_ewmh = ewmh_util::initialize()) == nullptr) {
|
||||
@ -329,8 +330,8 @@ namespace modules {
|
||||
}
|
||||
|
||||
if (m_scroll) {
|
||||
m_builder->action(mousebtn::SCROLL_DOWN, *this, EVENT_PREV, "");
|
||||
m_builder->action(mousebtn::SCROLL_UP, *this, EVENT_NEXT, "");
|
||||
m_builder->action(mousebtn::SCROLL_DOWN, *this, m_revscroll ? EVENT_NEXT : EVENT_PREV, "");
|
||||
m_builder->action(mousebtn::SCROLL_UP, *this, m_revscroll ? EVENT_PREV : EVENT_NEXT, "");
|
||||
}
|
||||
|
||||
m_builder->append(output);
|
||||
|
Loading…
Reference in New Issue
Block a user