Skip to content

Schedule dark mode#7

Merged
danirabbit merged 25 commits intoelementary:masterfrom
meisenzahl:schedule-dark-mode
Sep 29, 2020
Merged

Schedule dark mode#7
danirabbit merged 25 commits intoelementary:masterfrom
meisenzahl:schedule-dark-mode

Conversation

@meisenzahl
Copy link
Copy Markdown
Member

Moved from elementary/gala#863

Copy link
Copy Markdown
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this pull request! I left a few comments inline

@meisenzahl
Copy link
Copy Markdown
Member Author

Does anyone have an idea how I can query sunrise and sunset via DBUS? org.gnome.SettingsDaemon.Color properties' sunrise and sunset always return -1.0

@meisenzahl
Copy link
Copy Markdown
Member Author

It seems I need to port the logic to calculate sunrise and sunset from gnome-settings-daemon to Vala 🙈

@meisenzahl meisenzahl marked this pull request as ready for review August 20, 2020 18:51
@meisenzahl
Copy link
Copy Markdown
Member Author

It works 🤓

@meisenzahl
Copy link
Copy Markdown
Member Author

Related to #2

@cassidyjames
Copy link
Copy Markdown
Contributor

cassidyjames commented Aug 25, 2020

One other question I had: what is the UX of the failure state here, i.e. if GeoClue can't get a location? Do we have default times to fall back to (like 8 PM to 6 AM or something), will the dark style just never trigger, or will it potentially trigger at a strange time?

@danirabbit
Copy link
Copy Markdown
Member

That's actually something I was thinking about as well. It looks like GSD saves last known coordinates for night light. It might be a good thing for us to do that too and fall back to some reasonable time if that's never been set before

@meisenzahl
Copy link
Copy Markdown
Member Author

Does anyone have an idea how I can query sunrise and sunset via DBUS? org.gnome.SettingsDaemon.Color properties' sunrise and sunset always return -1.0

Originally posted by @meisenzahl in elementary/gala#863 (comment)

(like 8 PM to 6 AM or something)

So sane defaults as suggested by @cassidyjames?

Copy link
Copy Markdown
Member

@davidmhewitt davidmhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I've added an initial set of comments about the code.

Copy link
Copy Markdown
Member

@davidmhewitt davidmhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, starting to look better!

I have another few comments

Copy link
Copy Markdown
Member

@davidmhewitt davidmhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code looks really good now. I've left two very minor comments.

I've done some limited testing and it seems to work well too.

Thanks again for all your work on this, and sorry it took so long to re-review.

@davidmhewitt
Copy link
Copy Markdown
Member

I should add that I'm happy for this to be merged once my last two comments above are resolved!

@meisenzahl
Copy link
Copy Markdown
Member Author

@davidmhewitt Ready for review

@meisenzahl
Copy link
Copy Markdown
Member Author

@danrabbit Do you want to review? 🙂

@danirabbit
Copy link
Copy Markdown
Member

I've been running this for a while now so functionality works as expected in my usage. Nice job :)

@danirabbit danirabbit merged commit b61f3ff into elementary:master Sep 29, 2020
@meisenzahl meisenzahl deleted the schedule-dark-mode branch September 29, 2020 17:51
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.

4 participants