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=(
[ Shutdown]="shutdown now"
[ Reboot]="reboot"
[ Shutdown]="systemctl poweroff"
[ Reboot]="systemctl reboot"
[ Suspend]="systemctl suspend"
[ Hibernate]="systemctl hibernate"
[ Lock]="xflock4"
@ -171,7 +171,7 @@ function ask_confirmation() {
fi
if [ "${confirmed}" == 0 ]; then
"${menu[${selection}]}"
${menu[${selection}]}
fi
}
@ -180,6 +180,6 @@ if [[ $? -eq 0 && ! -z ${selection} ]]; then
${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
ask_confirmation
else
"${menu[${selection}]}"
${menu[${selection}]}
fi
fi