about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts/wrappers/lock
blob: d9d9fdbc8395a3c9c7b16ea036f420a5de4c1a7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env dash

# shellcheck source=/dev/null
SHELL_LIBRARY_VERSION="2.0.11" . %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