Fixed source of command not found errors in powermenu

This commit is contained in:
Evie Litherland-Smith 2023-04-06 18:17:32 +01:00
parent 0883aefa2f
commit b7dd06c751

View file

@ -113,8 +113,8 @@ typeset -A menu
# Menu with keys/commands # Menu with keys/commands
menu=( menu=(
[ Shutdown]="shutdown now" [ Shutdown]="systemctl poweroff"
[ Reboot]="reboot" [ Reboot]="systemctl reboot"
[ Suspend]="systemctl suspend" [ Suspend]="systemctl suspend"
[ Hibernate]="systemctl hibernate" [ Hibernate]="systemctl hibernate"
[ Lock]="xflock4" [ Lock]="xflock4"
@ -171,7 +171,7 @@ function ask_confirmation() {
fi fi
if [ "${confirmed}" == 0 ]; then if [ "${confirmed}" == 0 ]; then
"${menu[${selection}]}" ${menu[${selection}]}
fi fi
} }
@ -180,6 +180,6 @@ if [[ $? -eq 0 && ! -z ${selection} ]]; then
${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then ${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
ask_confirmation ask_confirmation
else else
"${menu[${selection}]}" ${menu[${selection}]}
fi fi
fi fi