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
Make backlight / alsa bar clickable #2562
Comments
And if I may, possibily, allow click-left click-middle click-right like other modules. |
yeah, maybe it would be a good idea to have some options like |
This has crossed my mind several times already. If anyone wants to work on this feel free :) It's going to be a bit of a pain to get this into the code because the progressbar code doesn't know anything about click actions and it requires adding an action tag around every segment of the progressbar. In addition this will require new module actions for all modules with clickable progressbars (alsa, pulseaudio, xbacklight, and backlight. mpd also has such an action).
I don't think that's a good idea. For one, the percentages are not always integers and depend on the size of the progressbar. Also, polybar already has ways to change the properties displayed by the progressbars (scrolling on the modules already does this). |
I added clickable feature in backlight module in #2703 - it toggles between min & max however 50% could be added as a step also... |
That definitely is a step in the right direction! |
It's waiting for merge as #2703 🙂 I might have another (perhaps more elegant) idea for your usesace: I could add left/middle/right click to set 0/50/100% - depending on touchscreen config it might b one/two/three finger tap on the module to set it to the corresponding value. How about that? |
It's not OP's initial request exactly, but for me, it would be even more enjoyable if any value could be set/recognized depending on where the user has clicked on the bar (not just 3 values like MIN/MED/MAX or deltas like +-10/20/30...). |
I don't think this is easily achievable unfortunately and I don't think this will get merged - my old PR was already in the "toddler" stage and I think it would start walking by now 😆 I'm currently looking for an alternative bar as my old fork randomly freezes and current version has no |
Is your feature request related to a problem? Please describe.
I would like the bar from the backlight module to respond to where I click on it. If I click on the left edge of the bar, I would like my backlight to be set to 0%, if I click on the right edge, I would like my backlight at 100% and if I click at the center, I would like my backlight to be at 50%. Same for the volume bar.
Why does polybar need this feature?
This greatly benefits people on a touchscreen monitor.
Describe the solution you'd like
I provided a solution in my first paragraph.
Describe alternatives you've considered
xmobar. I wrote a module for xmobar myself which does exactly that. But xmobar cannot handle my systemtray.
Additional context
The text was updated successfully, but these errors were encountered: