9 lines
352 B
Bash
9 lines
352 B
Bash
|
[[ ! -d ~/images/screenshots ]] && mkdir ~/images/screenshots
|
||
|
echo "you want to take screenshot of?"
|
||
|
c=$(printf "screen\nselected area" | dmenu)
|
||
|
dir="/home/$USER/images/screenshots"
|
||
|
id=$(openssl rand -hex 7)
|
||
|
|
||
|
[[ $c == "screen" ]] && shotgun -s $dir/$id.png || shotgun -g $(hacksaw) $dir/$id.png
|
||
|
xclip -selection clipboard -t image/png -i $dir/$id.png
|