From 2508fc6a89fea7565f625e3f44b3b00e5f2cfba9 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Sat, 21 May 2022 13:35:18 -0300 Subject: [PATCH] suspend: fix to work with systemd --- dotfiles/scripts/_lock | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dotfiles/scripts/_lock b/dotfiles/scripts/_lock index 2bf54d2..7c81b7e 100755 --- a/dotfiles/scripts/_lock +++ b/dotfiles/scripts/_lock @@ -2,4 +2,12 @@ swaylock -f -env SVDIR="{{@@ user_svdir @@}}" sv up swayidle +export SVDIR="{{@@ user_svdir @@}}" + +maybe() { + command -v $1 > /dev/null && + env "$@" +} + +maybe sv up swayidle +maybe systemctl --user start sway-idle.service