Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions bin/omarchy-system-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@

omarchy-state clear re*-required

# Schedule the reboot to happen after closing windows (detached from terminal)
nohup bash -c "sleep 2 && systemctl reboot --no-wall" >/dev/null 2>&1 &
# Schedule the reboot to happen after closing windows.
# Run it as a transient user unit rather than a backgrounded child of this
# script. A `nohup &` child stays inside the terminal's transient systemd scope
# (app-*.scope, created with --collect); closing that terminal below tears the
# scope down and SIGTERMs the still-sleeping child before it can issue the
# reboot, so the reboot is silently lost. A systemd-run unit lives in its own
# cgroup under the user manager and survives the scope teardown.
systemd-run --user --collect --quiet bash -c "sleep 2 && systemctl reboot --no-wall"

# Now close all windows
omarchy-hyprland-window-close-all
Expand Down