Files
dotfiles/.local/bin/screenshot.sh
2026-05-18 13:08:10 +02:00

9 lines
227 B
Bash
Executable File

#!/usr/bin/env sh
timeout 10 slurp > /tmp/selection.txt 2>/dev/null
if [ $? -eq 0 ] && [ -s /tmp/selection.txt ]; then
grim -g "$(cat /tmp/selection.txt)" - | wl-copy
else
grim - | wl-copy
fi
rm -f /tmp/selection.txt