Files
omarchycn/bin/omarchy-system-reboot
T
2026-07-19 10:31:27 -07:00

16 lines
523 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Reboot after closing application windows
# omarchy:examples=omarchy reboot | omarchy system reboot
# omarchy:aliases=omarchy reboot
# Schedule the reboot 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 reboot --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