Files
omarchycn/bin/omarchy-system-reboot
T
David Heinemeier HanssonandClaude Fable 5 bf15e896b9 Pin power action timers to 100ms accuracy
Transient systemd timers default to AccuracySec=1min, so the 2s
reboot/shutdown could fire up to a minute late.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 18:35:28 -07:00

16 lines
558 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" --timer-property=AccuracySec=100ms 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