Commit Graph

15 Commits

Author SHA1 Message Date
Lemmy 4e3450c22c autofmt + switched a couple logger.i to .d 2026-01-24 21:22:36 -05:00
WojciechSulocki-Gif 3f355e3083 feat: sync DDC brightness on startup and panel open
- BrightnessService: Add onIsDdcChanged handler to fetch brightness
  when DDC is detected at startup
- BrightnessService: Fix condition to update brightness when value is 0
- BrightnessPanel: Refresh DDC brightness when panel opens
- BrightnessCard: Fix timer to only run on user interaction (not continuously)
2026-01-25 01:03:13 +01:00
Lemmy e7ef4fa4e8 Brightness: Disabled systemic DDCUtil polling due to major performance impact on some hardware. DDCUtil is VERY slow and synchronous. 2026-01-19 17:00:09 -05:00
WojciechSulocki-Gif e4d321e1af fix(brightness): handle DRM_connector format in ddcutil output
Fixes #1427

The regex for parsing DRM connector from ddcutil output only matched
"DRM connector:" (with space), but newer versions of ddcutil output
"DRM_connector:" (with underscore).

This caused the connector field to be empty for all DDC monitors,
making it impossible to distinguish between multiple identical
monitors (e.g., two "Mi Monitor" displays on DP-2 and DP-3).

The fix uses a character class [_ ] to match both formats.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:17:50 +01:00
Ly-sec cafe05d5ff BrightnessService: possible solution for brightness with identical monitors (#1427) 2026-01-17 21:28:28 +01:00
Ly-sec ae295d6819 IPCService: add brightness set % (fix #1429) 2026-01-17 14:53:46 +01:00
Ly-sec bb04164ef8 BrightnessService: adjust ddcutil max brightness hopefully (#1378) 2026-01-13 18:49:14 +01:00
WojciechSulocki-Gif fa07a3ea35 Fix: Add DDC brightness polling and improve refresh logic
This commit addresses two issues with DDC monitor brightness:

1. **Added 30-second polling timer for DDC monitors**
   - DDC monitors don't emit change events when brightness is changed
     externally (via physical buttons or other applications)
   - New pollTimer automatically refreshes DDC brightness every 30 seconds
   - Timer respects active brightness changes (doesn't poll during user adjustments)

2. **Fixed refreshBrightnessFromSystem() parser**
   - Previously only parsed internal display format (2-line current/max)
   - Now correctly handles all three display types:
     * DDC: "VCP 10 C 100 100" (space-separated)
     * Apple: Single integer "100"
     * Internal: Two lines "current\nmax"
   - Unified parsing logic reduces code duplication

3. **Minor improvements**
   - Simplified increase/decrease brightness logic
   - Added debug logging for refresh operations
   - Removed NaN initialization for brightness property

Tested with DDC external monitor (MSI MAG401QR) on Hyprland.

🤖 Generated with Claude Code
2026-01-11 19:16:32 +01:00
Ly-sec 27224e5790 Brightness: more reliable ddcutil reading 2026-01-06 18:06:03 +01:00
Lemmy a14dc501be i18n + autofmt 2025-12-22 08:34:01 -05:00
Eric Handley fda36af1b3 BrightnessService: queue brightness commands to prevent overlap 2025-12-21 18:12:59 -08:00
Eric Handley 8712c13c40 BrightnessService: better ddcutil parameters to increase responsiveness 2025-12-21 18:12:59 -08:00
loner b9c12ec14c fix(brightness): Prevent brightness from getting stuck at minimum 2025-11-23 19:14:22 +08:00
ItsLemmy 3ff5b7639f Switched to qmlformat. 2025-11-16 17:07:03 -05:00
ItsLemmy 355271768c Services in subfolder + cleanup/fixes 2025-11-08 16:38:43 -05:00