From 93edaee6a1cad1a8ec313f82daaf970f2afb135c Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 27 Feb 2024 18:46:56 +0800 Subject: [PATCH] Sleep less when power on --- .config/sway/scripts/logout.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.config/sway/scripts/logout.sh b/.config/sway/scripts/logout.sh index 41410b5..742231c 100755 --- a/.config/sway/scripts/logout.sh +++ b/.config/sway/scripts/logout.sh @@ -14,12 +14,11 @@ choice=$(printf "%s\n" "${choices[@]}" | fuzzel -d --prompt "󰚥: ") if test "$choice" = lock ; then # sleep less when power on - # if acpi -a | grep -q on; then - # sleep_time=3600 - # else - # sleep_time=10 - # fi - sleep_time=10 + if acpi -a | grep -q on; then + sleep_time=3600 + else + sleep_time=10 + fi sleep 0.3 bright=`light`