28 lines
437 B
Bash
Executable File
28 lines
437 B
Bash
Executable File
#!/bin/sh
|
|
|
|
target=area
|
|
|
|
case "$1" in
|
|
-f|--fullscreen)
|
|
target=screen
|
|
shift
|
|
;;
|
|
esac
|
|
|
|
filename=~/Pictures/Screenshots/Screenshot_"$(date +'%Y%m%d_%H%M%S').png"
|
|
|
|
grimblast copysave "$target" "$filename" || exit 1
|
|
|
|
action="$(dunstify \
|
|
-i "$filename" \
|
|
-A "open,OPEN" \
|
|
-t 10000 \
|
|
"Screenshot saved" \
|
|
"$filename")"
|
|
|
|
case "$action" in
|
|
2) #click
|
|
xdg-open "$filename"
|
|
;;
|
|
esac
|