pi-exit-when-done0.2.0
Exit this session, or suspend, shutdown, or reboot once every running Pi/OMP session finishes.
Built for omp
The author tagged this package oh-my-pi.
Reports 0
No reports yet.
Readme
pi-exit-when-done
Tiny Pi / Oh My Pi extension for performing an action after agent runs finish.
Commands
/exit-when-done
/exit-when-done exit
/exit-when-done suspend
/exit-when-done shutdown
/exit-when-done reboot
/exit-when-done cancel
With no argument:
- if nothing is armed, it arms
exit - if anything is already armed, it cancels it
exit closes only this session. suspend, shutdown, and reboot are shared by every session of this user: the action runs once, after every session that is currently in an agent run has finished. A session that is sitting idle does not hold it up. Arming one while nothing is running still waits for the next agent run, then runs only if no other session is in a run at that point.
Shared state lives in a per-user folder under the OS temp directory (os.tmpdir()), so it works on Linux, macOS, and Windows. The selected action is one-shot.
Install with Pi
pi install git:github.com/USER/pi-exit-when-done
Install with Oh My Pi
omp plugin install github:USER/pi-exit-when-done
Suspend, shutdown, and reboot use systemctl. They run from the session that notices every running session has finished, including when the last busy session quits.