You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My initial impulse for this is that I use both backlight and hueshift, and it'd be nice for them to behave the same way, but they don't. I mean, on one, I left-click continually to cycle through a set of target values, and on the other I left-click to set one value, and then right-click to reset to the default. I can never remember which is which, and it's a minor annoyance.
Looking at the code to try to fix this, I find that there is a lot of copy-and-paste across blocks. Each block is responsible for handling its configuration options from scratch with no support for common patterns like cycle, incr-/decrementing a value with the scroll wheel, toggling a format, etc. Search the code for toggle to see what I mean.
I propose to start small, focused on my original motivation, and refactor the cycle feature of backlight and the set/reset feature of hueshift so they both work identically. The handlers for common settings could be in src/settings.rs. If this is successful, then piece by piece other parts can be factored out as desired.
The text was updated successfully, but these errors were encountered:
In case with hueshift and backlight, I agree that they do a very similar task (they are even merged in my bar!) but have different interfaces, which may be confusing. Maybe we can start by adding cycle to hueshift and deprecating click_temp?
However I'm not sure if it makes sense to factor this functionality out since it will be used only in two blocks.
Search the code for toggle to see what I mean.
Yes! This is something that would be really nice to implement for all blocks in one place, somehow.
Motivation
My initial impulse for this is that I use both
backlight
andhueshift
, and it'd be nice for them to behave the same way, but they don't. I mean, on one, I left-click continually tocycle
through a set of target values, and on the other I left-click toset
one value, and then right-click toreset
to the default. I can never remember which is which, and it's a minor annoyance.Looking at the code to try to fix this, I find that there is a lot of copy-and-paste across blocks. Each block is responsible for handling its configuration options from scratch with no support for common patterns like
cycle
, incr-/decrementing a value with the scroll wheel, toggling a format, etc. Search the code fortoggle
to see what I mean.Related issues
Proposal
I propose to start small, focused on my original motivation, and refactor the
cycle
feature of backlight and theset
/reset
feature of hueshift so they both work identically. The handlers for common settings could be insrc/settings.rs
. If this is successful, then piece by piece other parts can be factored out as desired.The text was updated successfully, but these errors were encountered: