From 209ce198f33f08ec2c3bca380d3b3567f4aa872e Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Thu, 29 Mar 2018 11:17:58 +0100 Subject: [PATCH] powermenu: add hibernate option --- .config/i3/powermenu.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/i3/powermenu.sh b/.config/i3/powermenu.sh index 015327c..3672c5d 100755 --- a/.config/i3/powermenu.sh +++ b/.config/i3/powermenu.sh @@ -1,17 +1,18 @@ #!/bin/bash -option=$(echo " lock| logout| sleep| power off| reboot| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -lines 6 -location 3 -tokenize false -matching normal | xargs) +option=$(echo " lock| logout| sleep| hibernate| power off| reboot| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -lines 6 -location 3 -tokenize false -matching normal | xargs) case $option in lock) ./lock.sh;; logout) i3-msg exit;; sleep) systemctl suspend;; + hibernate) systemctl hibernate;; power\ off) systemctl poweroff;; reboot) systemctl reboot;; windows) windows=`efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4` sudo efibootmgr -n $windows - systemctl reboot;; + sudo hibereboot;; esac exit 0