nixos-configs/modules/ags/config/widgets/screenshot/capture.sh
matt1432 6ca0d7248b
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: rename some flake attr directories
2024-12-16 15:51:41 -05:00

18 lines
330 B
Bash
Executable file

#!/usr/bin/env bash
if [[ "$1" == "region" ]]; then
if [[ "$2" == "true" ]]; then
wayfreeze & PID=$!
sleep .1
fi
selection="$(slurp)"
if [[ "$2" == "true" ]]; then
kill "$PID"
fi
exec grim -g "$selection" - | satty -f - || true
else
exec grim "$@" - | satty -f - || true
fi