Skip to content

WIP: gsd-night-light: Add brightness control

Current behaviour: Nightlight mode does not support brightness dimming.

Proposed change: We let the user set a dim and default brightness. When nightlight is on we transition to dim brightness, and on being disabled we transition to the default brightness.

Reason for change: Instead of just setting a warmer temperature, users might want to lower the screen brightness. This feature is already present in redshift.

Overview of change: Added 3 settings to dconf: night-light-brightness-enabled: Switch feature on/off night-light-brightness-dim: Dim value night-light-brightness-default: Reset value

Setting the dim value works in the same way as temperature. It slowly transitions to the required brightness over the smear period. Nightlight Preview also works as expected. Separate functions created for a smooth transition for brightness. For setting the brightness we make a synchronous proxy call to the org.gnome.SettingsDaemon.Power.Screen interface.

While we reset back to the night-light-brightness-default setting, We start the transition from the current brightness.

Closes: #528

Merge request reports