Run AppleScript on lid close?
114891
MacBook Air/Pro: run script upon lid close?
122289
Re-run an application script when it crashes?
45033
How to disable boot on MacBook Pro when lid is opened?
11497
How can I tell Ubuntu to do nothing when I close my laptop lid?
46850
Run a command in a shell and keep running the command when you close the session
23508
Script at Startup
20306
Auto-run scripts security options
77019
How can I tell Ubuntu 14.10 to do nothing when I close my laptop lid?
92207
GNOME: disable sleep on lid close
97752
GNOME: supend on laptop lid close no longer works since 19.10 upgrade
25783
Suspend on lid close, even with the option OFF
97425
JavaScript, browsers, window close - send an AJAX request or run a script on window closing
41999
How to run a script with systemd right before shutdown?
30341
Is there a windows app or simple scripting way to persuade windows to shutdown after a process ends?
83258
How to schedule a task to run when shutting down windows
102139
How do I run a script at start up?
138665
How to run a command before the machine automatically shuts down?