#!/bin/sh
swayidle \
timeout 1 'swaymsg "output * power off"' \
resume 'swaymsg "output * power on"' &
swaylock -c 000000
killall swayidle