diff --git a/code/shutdown-script/shutdown.sh b/code/shutdown-script/shutdown.sh new file mode 100755 index 0000000..6c81181 --- /dev/null +++ b/code/shutdown-script/shutdown.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +gxmessage -center -buttons "Cancel:42,Close session:0,Reboot:2,Shutdown:3" -default "Close session" -timeout 60 What do you want ? +retval=$? +if [ $retval -eq 0 ] ; then + pkill xmonad; +elif [ $retval -eq 2 ] ; then + sudo shutdown -r now; +elif [ $retval -eq 3 ] ; then + sudo shutdown -h now +#else + #echo "do nothing"; +fi +