Skip to content
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

Stopwatch: allow sleep #2048

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

liamcharger
Copy link
Contributor

I often use a stopwatch for things like running, and noticed that the watch won’t sleep when the stopwatch is running.

This PR gives the stopwatch the ability to run while the display is off.

Copy link

github-actions bot commented Mar 31, 2024

Build size and comparison to main:

Section Size Difference
text 373008B -80B
data 948B 0B
bss 22536B 0B

Run in InfiniEmu

@mark9064
Copy link
Member

So keep-awake was added in #432

I'm guessing it was so the device doesn't go to sleep right as you want to stop the timer / record a lap. So for people using the stopwatch to time things exactly / shorter durations, this PR is a regression. But when using the stopwatch for longer durations, keeping the screen on is a waste of energy and is annoying (e.g accidental touchscreen clicks while running from clothes)

Maybe there's a solution that keeps both parties happy?

@liamcharger
Copy link
Contributor Author

liamcharger commented Mar 31, 2024

That's true...

Having a setting for the stopwatch specifically would be a waste of resources--maybe implementing a setting for all the apps to enable or disable sleep could be nice, although I don't know if the benefit would be great enough. I can see it possibly working if the user wanted to stop the watch from sleeping when using the navigation app, or maybe when playing a game?

What do you think?

@mark9064
Copy link
Member

mark9064 commented Apr 3, 2024

Hmmm, I like the idea but I don't think it'll be convenient in practice as you may want different settings for each app, and also you need to remember to change it before you start the stopwatch. I think a keep awake toggle in the watch app itself (maybe hidden as a long press or a new button) is the only thing that would work, but I don't know how it'd be implemented in a way that keeps to the InfiniTime vision

@liamcharger
Copy link
Contributor Author

I don't think it'll be convenient in practice as you may want different settings for each app

I meant something like a list of checkboxes in the settings app for each user app, and selecting one would enable/disable sleep for that specific app.

I don't know how it'd be implemented in a way that keeps to the InfiniTime vision

What part of the vision would it be violating?

@mark9064
Copy link
Member

mark9064 commented Apr 4, 2024

I meant something like a list of checkboxes in the settings app for each user app, and selecting one would enable/disable sleep for that specific app.

Oh right, sorry I misunderstood your checkbox idea. Still the point about toggling before, but it matters less.
It does open the can of worms of settings depending on apps installed (as available apps can be configured). AFAIK the infrastructure for this doesn't exist yet, but it should be doable in this case

What part of the vision would it be violating?

There's no strict violation per se, but there are the "Prefer solid default experience over customization" and "Keep it simple" points. Personally I'm a KDE user so you can probably guess my opinion on these but I get why these are design goals for InfiniTime. It'd probably be best if JF weighed in on your idea though, as he definitely has the best idea of what the vision is all about

@mark9064
Copy link
Member

mark9064 commented Feb 12, 2025

Especially with #2141, I'm leaning towards allowing sleep by default as well. There's just not that many situations where I want a screen on stopwatch compared to one where I want to allow idling. It doesn't help that keeping the screen on means ghost touch inputs are very common

@liamcharger
Copy link
Contributor Author

Agreed! I just updated the branch and fixed merge conflicts, so feel free to review.

@mark9064 mark9064 added enhancement Enhancement to an existing app/feature UI/UX User interface/User experience and removed enhancement Enhancement to an existing app/feature labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI/UX User interface/User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants