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

support for custom backlight script #374

Open
wytrzeszcz opened this issue Jan 3, 2025 · 3 comments
Open

support for custom backlight script #374

wytrzeszcz opened this issue Jan 3, 2025 · 3 comments

Comments

@wytrzeszcz
Copy link

Right now Brightness can be control by ddcutils/brightnessctl/light
but in each case i can set only one monitor.

Describe the solution you'd like
The best option is to let user specify "other tool" and just provide command that get integer from 0 to 100.
eg if we put my_backlight.sh in "argument window" it will call
my_backlight.sh -S %d //set to given %
my_backlight.sh -G //get single number on stout to back report to widget

Describe alternatives you've considered
Right now I have such tool as script named light so i can go around this limitation

Additional context
It need some way to not spam this script as if we call multiple ddcutils under the hood and widget shall wait until end of such script execution.

I looked into Your code but some guide how to add such feature will be welcome as I can't see clear patch to add it

@nwg-piotr
Copy link
Owner

nwg-piotr commented Jan 3, 2025

If I understand well, we would have the same brightness on all monitors, right? Well, it doesn't make much sense to me. If you really need such a thing, just make an executor. Personally I use the controls module brightness slider for my main display and two BrightnessSlider instances in two panels on other displays.

@wytrzeszcz
Copy link
Author

Not necessarily the same in terms of value but more about perceived brightness; a custom script can achieve this, but you get the idea.

I understand that having multiple sliders works well for you, which is great. If you could provide hints on where I should make these changes for my fork, I would greatly appreciate it.

@nwg-piotr
Copy link
Owner

Firstly you need to add one more accepted value to the "backlight-controller" config key, e.g. "script". Open the glade/config_controls.glade in Glade.

obraz

Then add clauses elif controller == "script": in tools.py get_brightness and set_brightness. Place your code up there.

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

No branches or pull requests

2 participants