Live data from Hacker News

Show HN: Prevent your computer sleeping with just a webpage

nosleep.page

31–40 of 137 posts

Re: Show HN: Prevent your computer sleeping with just a webpage

#31
So i get annoyed that my computer doesn't go to sleep sometimes because some website is playing a video. Is there a simple way to tell Linux/Gnome/Chrome to ignore videos and go to sleep anyway? I don't watch long videos on this computer so I hate to come back into my office and find my screen never locked because some website played a video i wasn't even watching.

Re: Show HN: Prevent your computer sleeping with just a webpage

#33
post #21

On macOS just run `caffeinate` from the terminal (or `man caffeinate` for more info on the options). I know OP copped to “various Caffeine/Amphetamine apps” but said they're often “overkill”. In this case I think a system-provided command is less overkill than a web page that either uses a browser API or plays an empty video.

Does this stay on indefinitely? I don’t like using the command line to enable settings that I only need for an hour or so. I often forget to turn them off. I like that OP’s site turns keeps my machine awake while it’s open, and I can just close the tab when I want my machine to behave normally.

> Does this stay on indefinitely?

If you want. If you don’t, use the `-t` flag for it to turn off after a set number of seconds or `-w` to do so after a specific process ends.

Re: Show HN: Prevent your computer sleeping with just a webpage

#37
post #31

So i get annoyed that my computer doesn't go to sleep sometimes because some website is playing a video. Is there a simple way to tell Linux/Gnome/Chrome to ignore videos and go to sleep anyway? I don't watch long videos on this computer so I hate to come back into my office and find my screen never locked because some website played a video i wasn't even watching.

Additionally, something to tell me whether my PC will go to sleep or not if left alone. OP's problem happens to me every so often that I need to make sure the PC is indeed going to sleep before heading out.

Re: Show HN: Prevent your computer sleeping with just a webpage

#40
post #37
post #31

So i get annoyed that my computer doesn't go to sleep sometimes because some website is playing a video. Is there a simple way to tell Linux/Gnome/Chrome to ignore videos and go to sleep anyway? I don't watch long videos on this computer so I hate to come back into my office and find my screen never locked because some website played a video i wasn't even watching.

Additionally, something to tell me whether my PC will go to sleep or not if left alone. OP's problem happens to me every so often that I need to make sure the PC is indeed going to sleep before heading out.

Nothing like packing up your laptop at the end of the day, clicking "sleep" and wondering if it actually will cooperate or if you have open it back up and close random tabs and programs till it does,then waiting for the fan to audibly stop before putting it into a bag!
Post reply on HN