diff --git a/scripts/.local/bin/powermenu b/scripts/.local/bin/powermenu index 64f3cdf..71495c1 100755 --- a/scripts/.local/bin/powermenu +++ b/scripts/.local/bin/powermenu @@ -85,6 +85,11 @@ case "$result" in if [ -n "$POWERMENU_LOGOUT_CMD" ]; then eval "$POWERMENU_LOGOUT_CMD"; else command -v i3 >/dev/null 2>&1 && i3-msg exit command -v riverctl >/dev/null 2>&1 && riverctl exit + # Try to heuristically find the program started by greetd and shut it down. + # Generally this will just be a 'pause' program on my system. + if command -v pgrep >/dev/null 2>&1 && pgrep greetd; then + kill $(pgrep -P "$(pgrep greetd | tr '\n' ',')" pause) + fi fi ;; "Suspend" | "$suspend_btn")