From 06e929211ed204c2919bbb513ea22d93a8b72ef5 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 27 Jun 2026 02:11:50 +0200 Subject: pkgs/hibernate: Make sure, that swayidle is actually active --- pkgs/by-name/hi/hibernate/hibernate.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/hi/hibernate/hibernate.sh b/pkgs/by-name/hi/hibernate/hibernate.sh index 4a68e0d7..5f2a524a 100755 --- a/pkgs/by-name/hi/hibernate/hibernate.sh +++ b/pkgs/by-name/hi/hibernate/hibernate.sh @@ -10,7 +10,8 @@ # You should have received a copy of the License along with this program. # If not, see . -# TODO(@bpeetz): This functionality could be moved to `tskm`. <2025-04-14> +# TODO(@bpeetz): The task context reset functionality could be moved to `tskm`. <2025-04-14> +# TODO: This whole script should be a systemd service with Before=hibernate.target <2026-06-26> context="$(task _get rc.context)" [ "$context" ] && task context none @@ -19,6 +20,10 @@ context="$(task _get rc.context)" active="$(task +ACTIVE _ids)" [ "$active" ] && task stop "$active" +# Make sure that the swayidle service is actually running. Otherwise we don't get a +# screenlock upon hibernate-resume. +systemctl --user start swayidle.service + systemctl hibernate "$@" # vim: ft=sh -- cgit v1.3.1