From 1da34ec4fb2f8a305cd2f381dac77d7770156734 Mon Sep 17 00:00:00 2001 From: clxxiii Date: Thu, 2 Nov 2023 03:05:46 -0400 Subject: [PATCH] add DE-independent logout script --- .config/rofi/logout | 11 +++++++++++ .config/rofi/rofi-power-menu | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 .config/rofi/logout diff --git a/.config/rofi/logout b/.config/rofi/logout new file mode 100755 index 0000000..9877480 --- /dev/null +++ b/.config/rofi/logout @@ -0,0 +1,11 @@ +if [ "$XDG_SESSION_DESKTOP" == "bspwm" ]; then + bspc quit +fi + +if [ "$XDG_SESSION_DESKTOP" == "i3" ]; then + i3-msg exit +fi + +if [ "$XDG_SESSION_DESKTOP" == "i3-gnome" ]; then + i3-msg exit +fi diff --git a/.config/rofi/rofi-power-menu b/.config/rofi/rofi-power-menu index 596d0c9..4e262de 100755 --- a/.config/rofi/rofi-power-menu +++ b/.config/rofi/rofi-power-menu @@ -40,7 +40,7 @@ icons[cancel]="\u00d7" declare -A actions actions[lockscreen]="loginctl lock-session ${XDG_SESSION_ID-}" #actions[switchuser]="???" -actions[logout]="i3-msg exit" +actions[logout]="/home/eli/.config/rofi/logout" actions[suspend]="systemctl suspend" actions[hibernate]="systemctl hibernate" actions[reboot]="systemctl reboot" -- 2.51.2