Skip to content

feat(displays): add night light settings UI in displays - #20

Open
mateoalfaro wants to merge 1 commit into
singularityos-lab:mainfrom
mateoalfaro:night-light
Open

feat(displays): add night light settings UI in displays#20
mateoalfaro wants to merge 1 commit into
singularityos-lab:mainfrom
mateoalfaro:night-light

Conversation

@mateoalfaro

Copy link
Copy Markdown
Contributor

What

Adds a Night Light group to the Displays page, complementing the existing quick tile, which only toggles Night Light and already reflects the schedule-aware effective state.

  • Adds a master SwitchRow bound to night-light-enabled via settings.bind(..., switch_btn, ...), following the existing codebase pattern.

  • Adds an Adaptive Schedule switch that shows or hides the schedule controls.

  • Adds From and To TimePicker rows that write through the manager setters.

  • Adds a temperature Gtk.Scale covering 1000–6500 K in 100 K steps.

  • Keeps controls synchronized with external changes, including:

    • dconf changes
    • quick-tile changes
    • schedule transitions

    Synchronization is handled through NightLightManager.changed, with SignalHandler.block_matched preventing feedback loops.

  • Updates the master row subtitle to reflect the effective state:

    • On
    • Off
    • Off until 19:00 when adaptive scheduling is enabled

No new dependencies are introduced. The implementation uses the existing PreferencesGroup, SwitchRow, and TimePicker widgets.

Dependencies

Depends on the corresponding prs:

  • libsingularity changes for the manager API
  • singularity-desktop changes for the settings schema

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