Add screenshot.sh

This commit is contained in:
Ceda EI 2018-10-03 00:37:22 +05:30
parent 96d557b635
commit 8d9e8e1add
1 changed files with 10 additions and 0 deletions

10
screenshot.sh Executable file
View File

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