diff options
| author | Don Williams <don.e.williams@gmal.com> | 2026-08-28 15:40:29 -0400 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-08-29 21:41:57 -0700 |
| commit | 2b8b39347ae17c00b74fd798206cf4700374554d (patch) | |
| tree | 7abd4adc50b497eabf5719c4ec7273135cdfe717 /config | |
| parent | f88b19cd904371c049593c99286b87e38bc04101 (diff) | |
Fixed logout.sh was hanging at black screen
Signed-off-by: Don Williams <don.e.williams@gmal.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/scripts/Logout.sh
Diffstat (limited to 'config')
| -rwxr-xr-x | config/hypr/scripts/Logout.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/config/hypr/scripts/Logout.sh b/config/hypr/scripts/Logout.sh index 8187828c..af048f59 100755 --- a/config/hypr/scripts/Logout.sh +++ b/config/hypr/scripts/Logout.sh @@ -99,13 +99,22 @@ if [ -n "$LOGINCTL_BIN" ] && [ -n "${XDG_SESSION_ID:-}" ]; then fi fi -# Preferred path: synchronous hyprshutdown, so script does not silently succeed. +TIMEOUT_BIN="$(command -v timeout || true)" + +# Preferred path: synchronous hyprshutdown (with timeout to prevent hanging), so script does not silently stall. if [ -n "$HYPRSHUTDOWN_BIN" ]; then - if run_logged "hyprshutdown-no-fork" "$HYPRSHUTDOWN_BIN" --no-fork; then + if [ -n "$TIMEOUT_BIN" ]; then + SHUTDOWN_CMD=("$TIMEOUT_BIN" "2s" "$HYPRSHUTDOWN_BIN" "--no-fork") + else + SHUTDOWN_CMD=("$HYPRSHUTDOWN_BIN" "--no-fork") + fi + if run_logged "hyprshutdown-no-fork" "${SHUTDOWN_CMD[@]}"; then if logout_completed; then exit 0 fi log_msg "hyprshutdown returned success but Hyprland is still running" + else + log_msg "hyprshutdown failed or timed out, falling back to direct exit dispatchers" fi fi |
