From 4afb857a0ef9b6c4dde2441a2b284ad2372f2730 Mon Sep 17 00:00:00 2001 From: Joseph Groocock Date: Sat, 2 Apr 2016 18:59:24 +0100 Subject: [PATCH] Add cool power-menu script from the interwebs somewhere --- .config/i3/config | 2 +- .config/i3/powermenu.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 .config/i3/powermenu.sh 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