36 lines
650 B
Bash
36 lines
650 B
Bash
|
#!/usr/bin/env zsh
|
||
|
|
||
|
# screenshot function for an area
|
||
|
screenshot_area () {
|
||
|
grimblast \
|
||
|
--notify save area - | \
|
||
|
satty \
|
||
|
--filename - \
|
||
|
--fullscreen \
|
||
|
--output-filename ~/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png
|
||
|
}
|
||
|
|
||
|
# screenshot function for full screen
|
||
|
screenshot_screen () {
|
||
|
grimblast \
|
||
|
--notify save screen - | \
|
||
|
satty \
|
||
|
--filename - \
|
||
|
--fullscreen \
|
||
|
--output-filename ~/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png
|
||
|
}
|
||
|
|
||
|
# main function
|
||
|
case $1 in
|
||
|
area)
|
||
|
screenshot_area
|
||
|
;;
|
||
|
screen)
|
||
|
screenshot_screen
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 {area|screen}"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|