diff options
Diffstat (limited to 'hm/soispha/pkgs/scripts/wrappers/lock.sh')
-rwxr-xr-x | hm/soispha/pkgs/scripts/wrappers/lock.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/hm/soispha/pkgs/scripts/wrappers/lock.sh b/hm/soispha/pkgs/scripts/wrappers/lock.sh new file mode 100755 index 00000000..376773c6 --- /dev/null +++ b/hm/soispha/pkgs/scripts/wrappers/lock.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="2.0.13" . %SHELL_LIBRARY_PATH + + +context="$(task _get rc.context)"; +[ "$context" ] && task context none + +# We have ensured that only one task is active +active="$(task +ACTIVE _ids)"; +[ "$active" ] && task stop "$active" + +swaylock + +[ "$active" ] && task start "$active" + +[ "$context" ] && task context "$context" +# vim: ft=sh |