OCJvanDijk / Brightness-Sync

Synchronize the brightness of your built-in display with your LG UltraFine display(s)
MIT License
152 stars 17 forks source link

Allow the user to change the updateInterval. #15

Closed KonradChlupka closed 4 years ago

KonradChlupka commented 4 years ago

I rarely change the screen brightness, so it makes little sense for the app to keep polling the brightness, which results in relatively high energy usage. It would be great to be able to change this frequency, as I'd be perfectly happy with the sync taking a second or two. Even allowing this to be changed from the terminal with defaults write would be great for now.

OCJvanDijk commented 4 years ago

Yeah, makes sense.

Personally, I'm not sure the energy savings are worth it (like it says in the readme, it won't run on battery anyway), because it's untested and there might be some timing issues. Ideally it shouldn't matter, but because CoreDisplay can be weird at times the app does rely on some timing unfortunately. I can't see at first glance how changing the interval would break anything though, but you'll never know.

I'll make it a user default like you said and you can decide for yourself.

OCJvanDijk commented 4 years ago

You can try it in v2.2.0-beta.3. For the record: $ defaults write dev.vandijk.Brightness-Sync BSUpdateInterval 0.5 (for a 0.5 second interval)

You'll need to restart the app for the change to take effect.

soleares commented 4 years ago

@OCJvanDijk this is great. I’ve been building my own version just to update this. Thanks!