dotfiles/scripts/screenshoot.sh
2024-11-30 21:52:04 +01:00

8 lines
352 B
Bash
Executable file

[[ ! -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