Updated i3quit script

This commit is contained in:
dbroqua 2020-08-10 08:56:02 +02:00
parent 1e475daa8b
commit b63236470c
2 changed files with 20 additions and 5 deletions

14
Bin/i3quit.sh Executable file
View File

@ -0,0 +1,14 @@
#!/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 & ;;
2) systemctl suspend & ;;
3) systemctl reboot & ;;
4) exit ;;
esac

View File

@ -94,11 +94,12 @@ bindsym Mod1+Shift+Control+d move container to workspace next
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t error -m 'Q' \
-b 'Exit' 'i3-msg exit' \
-b 'Suspend' 'sudo s2ram -f -a 1' \
-b 'Reboot' 'systemctl reboot' \
-b 'Halt' 'systemctl poweroff'"
bindsym $mod+Shift+e exec "~/Bin/i3quit.sh"
#bindsym $mod+Shift+e exec "i3-nagbar -t error -m 'Q' \
# -b 'Exit' 'i3-msg exit' \
# -b 'Suspend' 'sudo s2ram -f -a 1' \
# -b 'Reboot' 'systemctl reboot' \
# -b 'Halt' 'systemctl poweroff'"
# -------------------------------------------------------------------------------------------------
# RESIZE MODE