~scripters/scripting/trunk

« back to all changes in this revision

Viewing changes to wrappers/ob-power

  • Committer: michael at profarius
  • Date: 2009-02-08 04:03:42 UTC
  • Revision ID: michael@profarius.com-20090208040342-fpppjg2ul2grwsy2
Cleaned up repository ; I felt this was very much needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
###
 
4
# Author: Michael Lustfield
 
5
# Desc: Sript to manage shutting down your
 
6
# computer without specific WM/DE tools.
 
7
###
 
8
 
 
9
gmessage "Are you sure you want to shut down your computer?" -center -title "Take action" -font "Sans bold 10" -default "Cancel" -buttons "_Cancel":1,"_Log out":2,"_Reboot":3,"_Shut down":4 >/dev/null 
 
10
 
 
11
case $? in
 
12
        1)
 
13
                echo "Exit";;
 
14
        2)
 
15
                killall openbox;;
 
16
        3)
 
17
                sudo shutdown -r now;;
 
18
        4)
 
19
                sudo shutdown -h now;;
 
20
esac