Here is the code.
Code: Select all
#! /bin/bash
# Exit dialogue box for antiX.
# Name: exitantix Make it executable and put in /usr/local/bin
action=$(yad --width 300 --entry --title"System Logout" \
--image=gnome-shutdown \
--button="gtk-ok:0" --button="gtk-close:1" \
--text"Choose action:" \
--entry-text \
"Power Off""Reboot""Suspend""Hibernate""Logout""Lock Screen")
case $action in
Power*) cmd="shutdown.sh" ;;
Reboot*) cmd="reboot.sh" ;;
Suspend*) cmd="antixsuspend.sh" ;;
Hibernate*) cmd="antixhibernate.sh" ;;
Lock*) cmd="xlock" ;;
Logout*) cmd="logouthelper.sh" ;;
*) exit 1 ;;
esac
eval exec $cmd
Comments welcome.