16 lines
536 B
Bash
Executable File
16 lines
536 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Shut down after closing application windows
|
|
# omarchy:examples=omarchy shutdown | omarchy system shutdown
|
|
# omarchy:aliases=omarchy shutdown
|
|
|
|
# Schedule the shutdown in the user manager so closing the terminal's systemd
|
|
# scope cannot terminate it before it runs.
|
|
systemd-run --user --collect --quiet --on-active="2s" systemctl poweroff --no-wall || exit 1
|
|
|
|
omarchy-state clear re*-required
|
|
|
|
# Now close all windows
|
|
omarchy-hyprland-window-close-all
|
|
sleep 1 # Allow apps like Chrome to shutdown correctly
|