summaryrefslogtreecommitdiff
path: root/hyprshutdown.sh
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-02-25 15:07:58 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-02-25 15:07:58 +0800
commit32ea522f854d1d3d8fbeb6733f16265bad65ec6d (patch)
tree47a552a6428a5300ecaf20ef347add1bd52763ce /hyprshutdown.sh
parentefa790b4dcd0cffada76566316153f4b2d36bafe (diff)
hyprshutdown: use --post-cmd poweroff
Diffstat (limited to 'hyprshutdown.sh')
-rwxr-xr-xhyprshutdown.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/hyprshutdown.sh b/hyprshutdown.sh
index 1153c19..77c69d0 100755
--- a/hyprshutdown.sh
+++ b/hyprshutdown.sh
@@ -6,6 +6,7 @@ cancel="Cancel"
confirm="Confirm"
DUP_ACTION=kill # or shutdown
DUP_AMOUNT=3 # this only matters if its shutdown
+SHUTDOWN="hyprshutdown --post-cmd poweroff"
other_pids=$(pidof -x -o $$ "$(basename "$0")")
dup_count=$(echo "$other_pids" | wc -w)
@@ -16,7 +17,7 @@ if [[ $DUP_ACTION == "kill" ]]; then
fi
elif [[ $DUP_ACTION == "shutdown" ]]; then
if [ $dup_count -ge DUP_AMOUNT ]; then
- hyprshutdown &!
+ $SHUTDOWN &!
kill $other_pids
fi
fi
@@ -24,7 +25,7 @@ fi
function dialog {
ans=$(timeout 1.2 hyprland-dialog --apptitle hyprshutdown --title "Shutting down in $1" --buttons "$cancel;$confirm")
if [[ $ans == $confirm ]]; then
- hyprshutdown &!
+ $SHUTDOWN &!
kill $self
elif [[ $ans == $cancel ]]; then
kill $self