Add scroll on battery widget to change screen brightness
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.
I like the behavior of the volume widget. Ideally this would just replicate that but for brightness instead of volume.
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.
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.