39 lines
882 B
Text
39 lines
882 B
Text
|
#!/bin/sh
|
||
|
|
||
|
|
||
|
menu() {
|
||
|
cd ~/Imagenes/Screenshots
|
||
|
file="$(date +%d:%b-%I:%M:%S).png"
|
||
|
dm="dmenu -i"
|
||
|
# Options
|
||
|
desktop="desktop"
|
||
|
area="area"
|
||
|
area2="area2"
|
||
|
|
||
|
ch=$( printf "$desktop\n$area\n$area2" | $dm -p "ScreenShots:")
|
||
|
case "$ch" in
|
||
|
$desktop)dsk ;;
|
||
|
$area) rg ;;
|
||
|
$area2) mr ;;
|
||
|
esac
|
||
|
}
|
||
|
|
||
|
dsk() {
|
||
|
sleep 3 && import -window root $file && herbe "A New ScreenShoot Has Been Taken " " "$file" "
|
||
|
}
|
||
|
|
||
|
rg() {
|
||
|
import $file && herbe "A New ScreenShoot Has Been Taken " " "$file" "
|
||
|
}
|
||
|
|
||
|
mr() {
|
||
|
import -snaps 3 $file && herbe "A New ScreenShoot Has Been Taken " " "$file" "
|
||
|
}
|
||
|
|
||
|
case $1 in
|
||
|
-s) cd ~/Imagenes/Screenshots/
|
||
|
file="$(date +%d:%b-%I:%M:%S).png"
|
||
|
sleep 3 && import -window root $file && herbe "A New ScreenShoot Has Been Taken " " "$file" " ;;
|
||
|
-m) menu ;;
|
||
|
esac
|