Suspend using your own custom timing - unlike screen savers

I fail to use automatic standby because:

  1. I often switch off automatic power saving and screen savers and forget to switch them back on
  2. In many cases, it's disturbing unattended processes like downloading
  3. Often defaults to not being active while in docking station or charger

So you might fall asleep in front of a movie. Or you might go out and forget your laptop.

Basically, if I for instance don't respond at 2 AM, I will assume that the computer can suspend because I'm asleep at that time.

Are you awake

Basically, add this script to your desktop user's crontab:

https://gist.github.com/benjaoming/49015c0265f80249da080c41f79ceebc

Skipping it once in a while

You can add your own custom logic in crontab or in the Python script.

A suggestion would be to only allow yourself to switch it off once per run.

For instance, if you want to switch it off in case /tmp/suspend_skip exists: if test -e /tmp/suspend_skip; then rm /tmp/suspend_skip; else python3 awake_or_suspend.py; fi