script I use to shutdown/reboot
This commit is contained in:
parent
bc2b8dbda1
commit
82fe3d8c3e
1 changed files with 14 additions and 0 deletions
14
code/shutdown-script/shutdown.sh
Executable file
14
code/shutdown-script/shutdown.sh
Executable file
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue