1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh choice="$( cat <<EOF | commander -c -w 1 -y 4 poweroff suspend hibernate reboot EOF )" [ "$choice" ] && systemctl "$choice"