#!/usr/bin/env bash # Lock the session with hyprlock, then blank the display. set -euo pipefail if ! pidof hyprlock >/dev/null; then ( hyprlock; hyprctl dispatch dpms on ) & fi hyprctl switchxkblayout all 0 >/dev/null 2>&1 || true ( sleep 3 pidof hyprlock >/dev/null || exit 0 hyprctl dispatch dpms off >/dev/null 2>&1 || true ) & exit 0