Files
quickshell/modules/wlogout/scripts/logout.sh
T
2026-06-01 16:09:54 +02:00

22 lines
526 B
Bash
Executable File

#!/bin/bash
# 1. Run helper script if it exists
if [[ -x "$SCRIPT_PATH" ]]; then
echo "Running helper script..."
bash "$SCRIPT_PATH"
else
echo "Helper script not found, skipping..."
fi
# 2. Run hyprshutdown if available
if command -v hyprshutdown >/dev/null 2>&1; then
echo "Running hyprshutdown..."
hyprshutdown
else
echo "Rebooting system..."
if command -v systemctl >/dev/null 2>&1; then
systemctl loginctl terminate-user $USER
else
pkill -KILL -u "$USER" -t tty2
fi
fi