From 96f0fe75bc1ffe355e7a5a7245da8da1742e4414 Mon Sep 17 00:00:00 2001 From: Faith Heath Date: Mon, 15 Aug 2022 16:50:29 -0700 Subject: [PATCH] Added kde support to logout on Powermenu --- files/powermenu/type-1/powermenu.sh | 2 ++ files/powermenu/type-2/powermenu.sh | 2 ++ files/powermenu/type-3/powermenu.sh | 2 ++ files/powermenu/type-4/powermenu.sh | 2 ++ files/powermenu/type-5/powermenu.sh | 2 ++ files/powermenu/type-6/powermenu.sh | 2 ++ 6 files changed, 12 insertions(+) diff --git a/files/powermenu/type-1/powermenu.sh b/files/powermenu/type-1/powermenu.sh index bb04c6d..0bcf6e0 100755 --- a/files/powermenu/type-1/powermenu.sh +++ b/files/powermenu/type-1/powermenu.sh @@ -78,6 +78,8 @@ run_cmd() { bspc quit elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then i3-msg exit + elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then + qdbus org.kde.ksmserver /KSMServer logout 0 0 0 fi fi else diff --git a/files/powermenu/type-2/powermenu.sh b/files/powermenu/type-2/powermenu.sh index 025da9f..11c87cb 100755 --- a/files/powermenu/type-2/powermenu.sh +++ b/files/powermenu/type-2/powermenu.sh @@ -79,6 +79,8 @@ run_cmd() { bspc quit elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then i3-msg exit + elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then + qdbus org.kde.ksmserver /KSMServer logout 0 0 0 fi fi else diff --git a/files/powermenu/type-3/powermenu.sh b/files/powermenu/type-3/powermenu.sh index 7599603..256e4d4 100755 --- a/files/powermenu/type-3/powermenu.sh +++ b/files/powermenu/type-3/powermenu.sh @@ -73,6 +73,8 @@ run_cmd() { bspc quit elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then i3-msg exit + elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then + qdbus org.kde.ksmserver /KSMServer logout 0 0 0 fi fi else diff --git a/files/powermenu/type-4/powermenu.sh b/files/powermenu/type-4/powermenu.sh index 7be1949..c6933ed 100755 --- a/files/powermenu/type-4/powermenu.sh +++ b/files/powermenu/type-4/powermenu.sh @@ -73,6 +73,8 @@ run_cmd() { bspc quit elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then i3-msg exit + elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then + qdbus org.kde.ksmserver /KSMServer logout 0 0 0 fi fi else diff --git a/files/powermenu/type-5/powermenu.sh b/files/powermenu/type-5/powermenu.sh index a73434a..756b45a 100755 --- a/files/powermenu/type-5/powermenu.sh +++ b/files/powermenu/type-5/powermenu.sh @@ -82,6 +82,8 @@ run_cmd() { bspc quit elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then i3-msg exit + elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then + qdbus org.kde.ksmserver /KSMServer logout 0 0 0 fi fi else diff --git a/files/powermenu/type-6/powermenu.sh b/files/powermenu/type-6/powermenu.sh index 8bfa042..72c1f04 100755 --- a/files/powermenu/type-6/powermenu.sh +++ b/files/powermenu/type-6/powermenu.sh @@ -82,6 +82,8 @@ run_cmd() { bspc quit elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then i3-msg exit + elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then + qdbus org.kde.ksmserver /KSMServer logout 0 0 0 fi fi else