From af38cb02a9ca95b20056bc92e73fe72a45d1f523 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Tue, 23 Apr 2013 18:59:15 +0200 Subject: Initial checkin. --- kde-logout | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 kde-logout (limited to 'kde-logout') diff --git a/kde-logout b/kde-logout new file mode 100755 index 0000000..dee150a --- /dev/null +++ b/kde-logout @@ -0,0 +1,16 @@ +#!/bin/sh +# x = 0 = noconfirm, 1 = confirm +# 0 2 0 = shutdown +# 0 1 0 = restart +# 0 0 0 = logoff? +case $1 in +l*) action=0 ;; +r*) action=1 ;; +s*) action=2 ;; +*) + echo "Usage: $0 {logout|restart|shutdown}" + exit 1 + ;; +esac + +qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 $action 0 -- cgit v1.2.1