dotfiles-remastered/.local/share/scripts/take-selected-screenshot.sh

16 lines
318 B
Bash
Raw Normal View History

2020-06-30 22:21:39 +00:00
#!/usr/bin/env sh
set -e
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCREENSHOT_DIR="$HOME/pictures/screenshots"
screenshotFile=$($SCRIPTPATH/take-screenshot.sh)
mv "$screenshotFile" "$SCREENSHOT_DIR"
rm -rf "$(dirname $screenshotFile)"
2020-07-14 16:58:37 +00:00
printf "%s\n" "$SCREENSHOT_DIR/$(basename $screenshotFile)"
2020-06-30 22:21:39 +00:00