1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Add cool power-menu script from the interwebs somewhere

This commit is contained in:
Joe Groocock 2016-04-02 18:59:24 +01:00
parent 6ff8f4688a
commit 4afb857a0e
2 changed files with 14 additions and 1 deletions

View File

@ -73,7 +73,7 @@ bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10 bindsym $mod+Shift+0 move container to workspace 10
# exit i3 (logs you out of your X session) # 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 $bg-color #2f343f
set $inactive-bg-color #2f343f set $inactive-bg-color #2f343f

13
.config/i3/powermenu.sh Executable file
View File

@ -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