neodotfiles/user/.config/suckless/dmenu/scripts/dmenu_scrot

44 lines
1.3 KiB
Text
Raw Normal View History

2022-12-20 00:15:21 +00:00
#!/usr/bin/env bash
# ***This script was made by Clay Gomera (Drake)***
# - Description: A simple screenshot dmenu script
# - Dependencies: scrot, dmenu, notify-send
## CREATING SCREENSHOT FOLDER ##
2023-02-04 04:44:45 +00:00
mkdir -p "$HOME/Pictures/Screenshots"
cd "$HOME/Pictures/Screenshots" || exit 0
2022-12-20 00:15:21 +00:00
## CHOICES ##
cho1="entire screen"
cho2="entire screen with delay"
cho3="focused window"
cho4="select area"
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"
2023-05-23 23:54:34 +00:00
## MAIN ACTION ##
choice=$(echo -e "$chos" | dmenu -i -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "Select: ")
case $choice in
$cho1)
scrot && notify-send "screenshot saved";;
$cho2)
del=$(echo -e "$dels" | dmenu -i -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "Select: ");
2022-12-20 00:15:21 +00:00
case $del in
$del1)
scrot -d 3 && notify-send "screenshot saved";;
$del2)
scrot -d 5 && notify-send "screenshot saved";;
$del3)
scrot -d 10 && notify-send "screenshot saved"
2023-05-23 23:54:34 +00:00
esac;;
$cho3)
scrot -u -b && notify-send "screenshot saved.";;
$cho4)
2022-12-20 00:15:21 +00:00
scrot -s && notify-send "screenshot saved."
esac