Files
dotfiles/hypr/scripts/lock.sh
2024-06-08 16:50:33 +02:00

12 lines
223 B
Bash

#!/bin/bash
# Split the string into an array at spaces
read -ra words <<<"$(xrandr | grep " connected" | awk '{print $1}')"
# Count the length of the array
length=${#words[@]}
if [ -z "$length" ]; then
exec swaylock
fi