2020-08-10 08:56:02 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# a simple logout dialog
|
|
|
|
|
|
|
|
# launch exit menu
|
|
|
|
choice=`echo -e "0: Logout\n1: Shutdown\n2: Suspend\n3: Reboot\n4: Cancel" | rofi -dmenu -p "select an action" | cut -d ':' -f 1`
|
|
|
|
|
|
|
|
# execute the choice in background
|
|
|
|
case "$choice" in
|
|
|
|
0) i3-msg exit & ;;
|
|
|
|
1) systemctl poweroff & ;;
|
2021-01-24 15:16:13 +01:00
|
|
|
2) ~/bin/lock.sh & sleep 2 && systemctl suspend & ;;
|
2020-08-10 08:56:02 +02:00
|
|
|
3) systemctl reboot & ;;
|
|
|
|
4) exit ;;
|
|
|
|
esac
|