nixos/home/scripts/lockhelper.sh

12 lines
267 B
Bash
Raw Normal View History

2024-06-10 00:26:51 +00:00
#!/usr/bin/env bash
set -eo pipefail
2024-06-10 22:53:59 +00:00
mkdir -p /tmp/lockscreen || true
monitors=$(hyprctl monitors -j | jq -r '.[] | select( .name | contains ("DP")) | .name')
2024-06-10 00:26:51 +00:00
2024-06-10 22:53:59 +00:00
while IFS= read -r m; do
grim -o "$m" "/tmp/lockscreen/$m.png" || true
done <<< "$monitors"
hyprlock