ZSH: Add user shutdown functions

These functions overwrite the executables reboot and shutdown
This commit is contained in:
Tom Willemsen 2011-10-17 00:07:14 +02:00
parent 2bd2535286
commit 9e4506a7d2

16
.zshrc
View file

@ -32,6 +32,22 @@ function line()
echo " $1" echo " $1"
} }
function shutdown()
{
dbus-send --system --print-reply \
--dest="org.freedesktop.ConsoleKit" \
/org/freedesktop/ConsoleKit/Manager \
org.freedesktop.ConsoleKit.Manager.Stop
}
function reboot()
{
dbus-send --system --print-reply \
--dest="org.freedesktop.ConsoleKit" \
/org/freedesktop/ConsoleKit/Manager \
org.freedesktop.ConsoleKit.Manager.Restart
}
# Initialize colors. # Initialize colors.
autoload -U colors autoload -U colors
colors colors