diff --git a/.config/i3/config b/.config/i3/config index 6861e94..6c7dc72 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -73,7 +73,7 @@ bindsym $mod+Shift+9 move container to workspace 9 bindsym $mod+Shift+0 move container to workspace 10 # exit i3 (logs you out of your X session) -bindsym $mod+Shift+Escape exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" +bindsym $mod+Shift+Escape exec --no-startup-id ~/.config/i3/powermenu.sh set $bg-color #2f343f set $inactive-bg-color #2f343f diff --git a/.config/i3/powermenu.sh b/.config/i3/powermenu.sh new file mode 100755 index 0000000..2ee2c19 --- /dev/null +++ b/.config/i3/powermenu.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +option=$(echo " lock| logout| sleep| shutdown| restart" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -location 3 | xargs) + +case $option in + lock) ./lock.sh;; + logout) i3-msg exit;; + restart) reboot;; + sleep) systemctl suspend;; + shutdown) poweroff;; +esac + +exit 0