# shellcheck shell=bash context="$(task _get rc.context)" [ -n "$context" ] && task context none # We have ensured that only one task is active active="$(task +ACTIVE _ids)" [ -n "$active" ] && task stop "$active" swaylock [ -n "$active" ] && task start "$active" [ -n "$context" ] && task context "$context" # vim: ft=sh