-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add auto sleep #1461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add auto sleep #1461
Conversation
Itai-Nelken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been using this for the last few days and it works very well though it is a bit annoying that it always returns to notifications on mode when stopping sleep. It would be better if it would return to the previous notification state in my opinion.
|
Restoring previous state should be something easy to implement. We would have to modify "QuickSettings.cpp", because notification state can change after auto sleep is set. However, I have concern that too many changes might block this PR |
I think you're right. Baby steps are better. |
|
There's another undefined behavior. What if previous setting is "sleep" ? Should the notification be set to on, off , or sleep ? In the mean time, this is the "back to previous status" but "back to off if is already in sleep" version. |
|
I think that returning to notifications off if it was set to sleep before auto sleep kicked in is probably the best solution. I think it might also be good for sleep to turn off when the alarm rings. |
|
I like this, it's a much needed feature IMO. I can't imagine a situation where I'd want it to enter sleep mode automatically then not leave sleep mode, is there a reason I'm missing for the 'stop sleep' being a separate checkbox? It would look cleaner with only one checkbox plus start/end times. edit: the name should probably be changed as 'sleep setting' could be confusing. Quiet hours maybe? |
|
It would be nice to have even more checkboxes. Sleep Bluetooth comes to my mind. |
|
I originally design it this way because I might manually enter sleep/off mode (go to bed early) but may forget to turn it on in the morning. That's why there are two checkboxs and why "stop sleep" is set to "on" instead of previous state. The UI also make sure users cannot set start/stop to the same time. (only one checkbox will be active in this case) I agree "sleep mode" should be something simple and easy to use. I also like the idea of even fine grained customization. I do have auto brightness on my build so I can certainly see the reason of auto sleep bluetooth. But meragable PR is my focus for now. Maybe we can keep the default UI simple but let user set the advanced options on the companion app when PR 1441 is ready. |
|
Is it in 24h time or 12h? |
|
It's 24H. |
|
Maybe reducing it to 30 minute increments would allow localization indicators like time zone to fit in sort of an |
commit d2fc306 Author: Boteium <boteium@users.noreply.github.com> Date: Fri Dec 2 14:58:31 2022 +0800 update option name commit efbe748 Author: SuIông N <Boteium@users.noreply.github.com> Date: Fri Dec 2 14:55:49 2022 +0800 Update title Co-authored-by: Itai Nelken <70802936+Itai-Nelken@users.noreply.github.com> commit 0f1cc69 Author: Boteium <boteium@users.noreply.github.com> Date: Sat Nov 26 18:18:43 2022 +0800 add auto sleep
commit d2fc306 Author: Boteium <boteium@users.noreply.github.com> Date: Fri Dec 2 14:58:31 2022 +0800 update option name commit efbe748 Author: SuIông N <Boteium@users.noreply.github.com> Date: Fri Dec 2 14:55:49 2022 +0800 Update title Co-authored-by: Itai Nelken <70802936+Itai-Nelken@users.noreply.github.com> commit 0f1cc69 Author: Boteium <boteium@users.noreply.github.com> Date: Sat Nov 26 18:18:43 2022 +0800 add auto sleep
|
Build size and comparison to main:
|
|
Works well 👍 (daily driven since may) |

This PR add the option to automatically toggle on/off sleep mode during the night

This should address issue #1440