This repository has been archived on 2023-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/scripts/dwm-screenshot
diego castillo salazar 854ce6b58d Cleaning
2022-11-01 13:27:56 -05:00

38 lines
882 B
Bash
Executable file

#!/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