Comment
Comment by tristanj
Both of those are trivial to do in a few lines of shell. There's no need to write or download a custom tool for this. I asked Opus to draft one up and it's just five lines long.
How to use it:
Sleep is re-enabled when: the command finishes, the user presses Enter, on Ctrl-C, on SSH disconnect, or on kill (excluding SIGKILL). If the lid is closed when the command finishes, sleep is re-enabled and the Mac goes to sleep.