2022-04-05 16:59:13 +02:00
#!/bin/sh
# It lets you choose the kind of screenshot to take, including
# copying the image or even highlighting an area to copy.
2022-07-17 11:03:13 +02:00
source $HOME/.config/dmenu/config
2022-09-02 08:53:36 +02:00
dir="$HOME/pics/screenshots"
2022-04-05 16:59:13 +02:00
[ ! -d "$dir" ] && mkdir $dir -p
2022-07-17 11:03:13 +02:00
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | $DMENU -l 6 -p "Screenshot which area?")" in
2022-10-25 22:08:36 +02:00
"a selected area") sleep 0.5; shotgun -g $(hacksaw) $dir/pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;;
"full screen") sleep 0.5; shotgun $dir/pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;;
2022-04-05 16:59:13 +02:00
esac