36 lines
650 B
Bash
Executable File
36 lines
650 B
Bash
Executable File
#!/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
|