summaryrefslogtreecommitdiff
path: root/scripts/Scripts/screenshot
blob: 5ed5b7d2339116e7c18dfdadd308217f21d81854 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

mkdir -p ~/Pictures/Screenshots

FILE=~/Pictures/Screenshots/$(date '+%Y-%m-%d_%H-%M-%S').png

if [[ "$1" == "snip" ]]; then
    grim -g "$(slurp)" "$FILE" || exit 1
else
    grim "$FILE" || exit 1
fi

wl-copy --type image/png < "$FILE"

notify-send "Screenshot Taken" "Saved to $FILE" -i "$FILE"