From 9e4506a7d2fc2dd0bae551ed2dd73794111ca957 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 17 Oct 2011 00:07:14 +0200 Subject: ZSH: Add user shutdown functions These functions overwrite the executables reboot and shutdown --- .zshrc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 4c8ca02..656bd9c 100644 --- a/.zshrc +++ b/.zshrc @@ -32,6 +32,22 @@ function line() 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. autoload -U colors colors -- cgit v1.2.3-54-g00ecf