Skip to content

Add DDC monitor support via ddcutil for brightness #119

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Dirold2
Copy link

@Dirold2 Dirold2 commented Apr 22, 2025

  • Implement ddcutil backend for external displays
  • Add debounced brightness updates (100ms delay)
  • Support async DDC/CI commands with callbacks
  • Maintain cache for last known brightness value

- Implement ddcutil backend for external displays
- Add debounced brightness updates (100ms delay)
- Support async DDC/CI commands with callbacks
- Maintain cache for last known brightness value
@Axenide
Copy link
Owner

Axenide commented Apr 23, 2025

Thanks, will check later.
Also, using the threading library within GTK can cause issues with how GLib handles threads. It would be better to use GLib for threading.

- Reduce code size by ~40% while maintaining full functionality
- Replace GTK file monitoring with GLib-only polling mechanism
- Optimize brightness caching to reduce external process calls
- Implement threshold-based change detection to minimize updates
- Add efficient error handling with proper resource cleanup
- Improve debouncing mechanism for better responsiveness
- Simplify backend detection and initialization logic

This commit significantly improves performance by reducing subprocess
calls and implementing more efficient polling. The service now works
without any GTK dependencies, using only GLib for timers and
synchronization.
@Dirold2
Copy link
Author

Dirold2 commented May 5, 2025

Well, I think I've managed to rewrite the code to fully use GLib.

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

Successfully merging this pull request may close these issues.

2 participants