Skip to content

feat: per-display brightness range controls and proportional sync#52

Open
RhoMancer wants to merge 1 commit into
sidevesh:mainfrom
RhoMancer:feature/max-brightness-cap
Open

feat: per-display brightness range controls and proportional sync#52
RhoMancer wants to merge 1 commit into
sidevesh:mainfrom
RhoMancer:feature/max-brightness-cap

Conversation

@RhoMancer

Copy link
Copy Markdown

Summary

  • Add configurable min/max brightness caps per display (clickable range labels in GUI)
  • Add proportional brightness sync mode that maintains relative position across displays with different ranges
  • Exact sync and proportional sync are mutually exclusive checkboxes
  • Fixed-width slider values and range labels prevent layout shifts
  • Range labels hidden by default behind "Set brightness range" toggle
  • Min/max sliders are disabled when set to the same value (fixed brightness)

Files changed

  • install_files/com.sidevesh.Luminance.gschema.xml.in — min/max-brightness-per-display keys, proportional sync key
  • src/constants/main.c — new GSettings key defines
  • src/states/brightness_range.c — new state module for min/max per display
  • src/states/is_brightness_linked.c — added proportional sync getter/setter
  • src/ui/components/display_brightness_scale.c — min/max range support, fixed-width format
  • src/ui/components/link_brightness_check_button.c — renamed label for clarity
  • src/ui/components/range_label.c — new clickable editable label for min/max values
  • src/ui/screens/show_displays.c — min/max labels, proportional sync, linked brightness respects caps

Test plan

  • Build and install on GNOME/Wayland with 3 external displays
  • Set max brightness on one display via GUI, verify slider caps and brightness clamps
  • Set min brightness, verify slider range updates
  • Set min==max, verify slider shows fixed value and is disabled
  • Exact sync respects per-display caps
  • Proportional sync maps position correctly across different ranges
  • Toggling one sync mode untoggles the other
  • Values persist across app restarts

👾 Generated with Letta Code

Add min/max brightness caps per display with clickable range labels in the GUI.
Add proportional brightness sync mode that maintains relative position across
displays with different ranges. Both sync modes (exact and proportional) are
mutually exclusive. Fixed-width slider values and range labels prevent layout
shifts. Range labels are hidden by default behind a "Set brightness range" toggle.

- New: brightness_range.c state module for min/max per display (GSettings a{si})
- New: range_label.c clickable editable label component
- Modified: show_displays.c with min/max labels, proportional sync, linked
  brightness respects individual caps
- Modified: gschema with min/max-brightness-per-display and sync mode keys
- Modified: slider format to fixed-width (%3d) to prevent resizing

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
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.

1 participant