Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scroll on battery widget to change screen brightness #207

Open
carterprince opened this issue Jan 14, 2024 · 3 comments · May be fixed by #209
Open

Add scroll on battery widget to change screen brightness #207

carterprince opened this issue Jan 14, 2024 · 3 comments · May be fixed by #209

Comments

@carterprince
Copy link
Contributor

carterprince commented Jan 14, 2024

Scroll up on the battery widget -> brightness goes up
Scroll down on the battery widget -> brightness goes down

I always wanted this in stock GNOME but you have to install a third-party extension to do it.

In the meantime I created a simple patch to do this, but it's not pretty. It relies on brightnessctl.

patch.txt

@carterprince
Copy link
Contributor Author

I like the behavior of the volume widget. Ideally this would just replicate that but for brightness instead of volume.

@soreau
Copy link
Member

soreau commented Jan 14, 2024

Your patch doesn't seem too bad, maybe make a PR of it? You could check command -v brightnessctl upfront and show a warning if it isn't available, otherwise, hook up the scroll function as you already do currently.

@ammen99
Copy link
Member

ammen99 commented Jan 14, 2024

Some suggestions:

  • Make the command configurable with options in the cfg file.
  • Call the commands only on discrete scroll events, and if we have 3 steps of discrete scroll, then call the command(s) 3 times.

@carterprince carterprince linked a pull request Jan 16, 2024 that will close this issue
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 a pull request may close this issue.

3 participants