You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
536 B
22 lines
536 B
6 years ago
|
#!/bin/bash
|
||
|
|
||
|
# A simple wrapper around scrot
|
||
|
#
|
||
|
# When run, the screenshot will be added to she clipboard
|
||
|
|
||
|
case $1 in
|
||
|
"window")
|
||
6 years ago
|
file=$(scrot -u '/tmp/%F_%T_$wx$h.png' -e 'echo -n /tmp/%F_%T_$wx$h.png')
|
||
6 years ago
|
;;
|
||
|
"select")
|
||
6 years ago
|
file=$(sleep 0.2; scrot -s '/tmp/%F_%T_$wx$h.png' -e 'echo -n /tmp/%F_%T_$wx$h.png')
|
||
6 years ago
|
;;
|
||
|
*)
|
||
6 years ago
|
file=$(scrot '/tmp/%F_%T_$wx$h.png' -e 'echo -n /tmp/%F_%T_$wx$h.png')
|
||
6 years ago
|
;;
|
||
|
esac
|
||
|
|
||
|
xclip -selection clipboard -target image/png -i "$file"
|
||
6 years ago
|
echo -n "$file" | xclip -selection primary
|
||
|
notify-send "New Screenshot" "$file"
|