43 lines
1.1 KiB
Bash
Executable file
43 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# ***This script was made by Clay Gomera (Drake)***
|
|
# - Description: A simple screenshot dmenu script
|
|
# - Dependencies: escrotum, dmenu, notify-send
|
|
|
|
## CREATING SCREENSHOT FOLDER ##
|
|
mkdir -p "$HOME/Media/Pictures/Screenshots"
|
|
cd "$HOME/Media/Pictures/Screenshots" || exit 0
|
|
|
|
## CHOICES ##
|
|
cho1=" Entire screen"
|
|
cho2=" Entire screen with delay"
|
|
cho3=" Select window or area"
|
|
cho4=" Exit"
|
|
chos="$cho1\n$cho2\n$cho3\n$cho4"
|
|
|
|
## DELAY OPTIONS ##
|
|
del1=" 3 sec delay"
|
|
del2=" 5 sec delay"
|
|
del3=" 10 sec delay"
|
|
dels="$del1\n$del2\n$del3"
|
|
|
|
## MAIN ACTION ##
|
|
choice=$(echo -e "$chos" | rofi -dmenu -i -p " Sreenshot Menu ")
|
|
case $choice in
|
|
"$cho1")
|
|
escrotum && notify-send "Screenshot saved";;
|
|
"$cho2")
|
|
del=$(echo -e "$dels" | rofi -dmenu -i -p " Select Delay ");
|
|
case $del in
|
|
"$del1")
|
|
escrotum -d 3 -C && notify-send "Screenshot saved";;
|
|
"$del2")
|
|
escrotum -d 5 -C && notify-send "Screenshot saved";;
|
|
"$del3")
|
|
escrotum -d 10 -C && notify-send "Screenshot saved"
|
|
esac ;;
|
|
"$cho3")
|
|
escrotum -s && notify-send "Screenshot saved.";;
|
|
"$cho4")
|
|
exit 0
|
|
esac
|