1#!/usr/bin/env bash 2 3# lock if only monitor 4if [ "$(@wmmsg@ -t get_outputs | grep '"type": "output"' | wc -l)" = "1" ]; then 5 loginctl lock-session 6fi