18 lines
330 B
Bash
Executable file
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
|