Sleep and Shutdown Timer for Mac
It is purely written in Applescript. Therefore, no installation is needed.
If you do not want to execute the bundled app, just download the applescript source file and execute it on your Mac.
Please note: Since macOS Mojave 10.14 you need to add the app manually to System Preferences -> Security & Privacy -> Accessibility -> +
Author: Thomas Biasion