about summary refs log blame commit diff stats
path: root/pkgs/by-name/lo/lock/lock.sh
blob: 3101ef9a299a806820693ae3d98182bb1ab8b662 (plain) (tree)
1
2
3
4
5
6
7
8
9

                             
                                                   
 
                                 

                                              
                             






                                         
#!/usr/bin/env dash

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