mirror of
https://github.com/polybar/polybar.git
synced 2026-03-07 16:59:20 +00:00
feat(backlight): Add scroll-interval (#2700)
Closes #2696 * Added `scroll-interval` option to `internal/backlight` * Added PR to CHANGELOG.md * Fixed indentation
This commit is contained in:
@ -33,6 +33,8 @@ namespace modules {
|
||||
// Get flag to check if we should add scroll handlers for changing value
|
||||
m_scroll = m_conf.get(name(), "enable-scroll", m_scroll);
|
||||
|
||||
m_scroll_interval = m_conf.get(name(), "scroll-interval", m_scroll_interval);
|
||||
|
||||
// Add formats and elements
|
||||
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_BAR, TAG_RAMP});
|
||||
|
||||
@ -120,11 +122,11 @@ namespace modules {
|
||||
}
|
||||
|
||||
void backlight_module::action_inc() {
|
||||
change_value(5);
|
||||
change_value(m_scroll_interval);
|
||||
}
|
||||
|
||||
void backlight_module::action_dec() {
|
||||
change_value(-5);
|
||||
change_value(-m_scroll_interval);
|
||||
}
|
||||
|
||||
void backlight_module::change_value(int value_mod) {
|
||||
|
||||
Reference in New Issue
Block a user