dotfiles/bin/executable_i3-screenshot

13 lines
333 B
Bash
Executable File

#!/bin/bash
FOLDER="/home/bascht/Pictures/Screenshots/$(date +'%Y-%m')"
mkdir -p ${FOLDER}
if [ -z "$WAYLAND_DISPLAY" ]; then
NAME="${FOLDER}/Screenshot-%Y-%m-%d-%H%M%S-\$wx\$h.png"
exec escrotum "$NAME" $*
else
NAME="${FOLDER}/Screenshot-$(date +%Y-%m-%d-%H%M%S).png"
grim -g "$(slurp)" "$NAME";
echo $NAME
fi;