dotfiles-remastered/.local/share/scripts/take-screenshot.sh
2023-12-02 02:24:01 +01:00

19 lines
381 B
Bash
Executable File

#!/usr/bin/env sh
# makes a selection screenshot and prints out the filename in a date format
# not intended for direct use. Dosn't remove tmp dir
# required packages:
# - deepin-screenshot
set -e
TMPDIR=$(mktemp -d)
GRIM_DEFAULT_DIR="$TMPDIR" grim -g "$(slurp)"
filename="$(date +"%d-%m-%y-%H-%M-%Z").png"
mv $TMPDIR/* "$TMPDIR/$filename"
printf "%s\n" "$TMPDIR/$filename"