Skip to content

Conversation

itsfarseen
Copy link
Contributor

@itsfarseen itsfarseen commented Mar 24, 2022

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

When we enable natural scrolling option in libinput, it sends scroll down even when we swipe up on the touchpad.
This makes the pulseaudio module feel weird.
This option fixes that.

Related Issues & Documents

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

Add the following to the wiki under Pulseaudio:

# Reverses the increment/decrement on scroll event. Set this to true if you are using natural scrolling option on your touchpad.
reverse-scroll = false

Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I didn't know that that's how natural scrolling was implemented, but that actually makes a lot of sense.

Please also add your changes to the changelog: https://github.com/polybar/polybar/blob/master/CONTRIBUTING.md#changelog

@@ -26,6 +26,7 @@ namespace modules {

auto sink_name = m_conf.get(name(), "sink", ""s);
bool m_max_volume = m_conf.get(name(), "use-ui-max", true);
m_invert_scroll = m_conf.get(name(), "invert-scroll", false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please call the option reverse-scroll to be consistent with other modules that also have such an option.

@itsfarseen
Copy link
Contributor Author

@patrick96, I have renamed the field and added changelog entry.

Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, thanks!

I went a head and resolved the merge conflicts.

@codecov
Copy link

codecov bot commented Apr 2, 2022

Codecov Report

Merging #2664 (75240a6) into master (36d19d3) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head 75240a6 differs from pull request most recent head 83727e6. Consider uploading reports for the commit 83727e6 to get more accurate results

@@            Coverage Diff             @@
##           master    #2664      +/-   ##
==========================================
- Coverage   11.76%   11.76%   -0.01%     
==========================================
  Files         149      149              
  Lines       11302    11306       +4     
==========================================
  Hits         1330     1330              
- Misses       9972     9976       +4     
Flag Coverage Δ
unittests 11.76% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/modules/pulseaudio.cpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36d19d3...83727e6. Read the comment docs.

itsfarseen and others added 2 commits April 2, 2022 23:41
When we enable natural scrolling option in libinput,
it sends scroll down event when we swipe up on the touchpad.
This makes the pulseaudio module feel weird.
This option fixes that.
@patrick96 patrick96 merged commit a2c1392 into polybar:master Apr 2, 2022
@patrick96 patrick96 changed the title feat(pulseaudio): define invert-scroll option feat(pulseaudio): define reverse-scroll option Apr 2, 2022
@patrick96 patrick96 mentioned this pull request Nov 5, 2023
24 tasks
druckdev added a commit to druckdev/polybar that referenced this pull request Feb 16, 2024
reverse-scroll was already added as an option to pulseaudio in
a2c1392 ("feat(pulseaudio): define reverse-scroll option (polybar#2664)"):

> When we enable natural scrolling option in libinput,
> it sends scroll down event when we swipe up on the touchpad.
> This makes the pulseaudio module feel weird.
> This option fixes that.
druckdev added a commit to druckdev/polybar that referenced this pull request Feb 16, 2024
reverse-scroll was already added as an option to pulseaudio in
a2c1392 ("feat(pulseaudio): define reverse-scroll option (polybar#2664)"):

> When we enable natural scrolling option in libinput,
> it sends scroll down event when we swipe up on the touchpad.
> This makes the pulseaudio module feel weird.
> This option fixes that.

(cherry picked from commit c759b36)
druckdev added a commit to druckdev/polybar that referenced this pull request Feb 16, 2024
reverse-scroll was already added as an option to pulseaudio in
a2c1392 ("feat(pulseaudio): define reverse-scroll option (polybar#2664)"):

> When we enable natural scrolling option in libinput,
> it sends scroll down event when we swipe up on the touchpad.
> This makes the pulseaudio module feel weird.
> This option fixes that.
druckdev added a commit to druckdev/polybar that referenced this pull request Nov 1, 2024
reverse-scroll was already added as an option to pulseaudio in
a2c1392 ("feat(pulseaudio): define reverse-scroll option (polybar#2664)"):

> When we enable natural scrolling option in libinput,
> it sends scroll down event when we swipe up on the touchpad.
> This makes the pulseaudio module feel weird.
> This option fixes that.

(cherry picked from commit c759b36)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants