From c29d448edeaf31cb4e7d85f1b4ec2c91c1468514 Mon Sep 17 00:00:00 2001 From: eoli3n Date: Thu, 9 Apr 2020 09:49:59 +0200 Subject: [PATCH] improve powermenu --- roles/rofi/templates/powermenu.j2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/rofi/templates/powermenu.j2 b/roles/rofi/templates/powermenu.j2 index a9db85b..e4c0869 100755 --- a/roles/rofi/templates/powermenu.j2 +++ b/roles/rofi/templates/powermenu.j2 @@ -3,7 +3,7 @@ {% if ansible_hostname == "work" %} action=$(echo -e "lock\nhibernate\nlogout\nshutdown\nreboot" | rofi -dmenu -p "power:") {% else %} -action=$(echo -e "suspend\nlock\nhibernate\nlogout\nshutdown\nreboot" | rofi -dmenu -p "power:") +action=$(echo -e "suspend\nlock\nhibernate\nsuspend-then-hibernate\nlogout\nshutdown\nreboot" | rofi -dmenu -p "power:") {% endif %} if [[ "$action" == "lock" ]] @@ -16,6 +16,11 @@ then swaylock-fancy && systemctl suspend-then-hibernate && echo '*/reconnect' >~/.weechat/weechat_fifo fi +if [[ "$action" == "suspend-then-hibernate" ]] +then + ~/.i3/i3lock-fancy-multimonitor/lock && systemctl suspend-then-hibernate && echo '*/reconnect' >~/.weechat/weechat_fifo +fi + if [[ "$action" == "hibernate" ]] then systemctl hibernate