blob: e789c6ea8c6b74dbedd320a54b23a7bfcd55ff27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env dash
sspath="$HOME/media"
ssname="$(date +"%F_%I%M").png"
cd $sspath
if [ "$1" = "a" ]; then
scrot $ssname
else
scrot -s $ssname
fi
if [ $? -ne 0 ]; then
dunstify -t 2000 "Screenshot aborted"
exit 0
fi
xclip -selection clipboard -t image/png $ssname
sleep 1
dunstify "Screenshot taked" "$sspath\n$ssname"
|