diff --git a/Bin/i3quit.sh b/Bin/i3quit.sh new file mode 100755 index 0000000..288d6c2 --- /dev/null +++ b/Bin/i3quit.sh @@ -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 diff --git a/config/i3/config b/config/i3/config index 81a84d5..39fe681 100644 --- a/config/i3/config +++ b/config/i3/config @@ -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