pc-monitor-bot/screenshot.sh

10 lines
147 B
Bash
Executable File

#!/usr/bin/env bash
var=$(mktemp /tmp/XXXXXXXX.png)
scrot -zm $var
exit_code=$?
if [[ $exit_code -ne 0 ]]; then
exit $exit_code
fi
echo -n $var