1234567891011121314151617181920212223 |
- #!/bin/sh
- . ~/.zshenv
- if [ "$1" = "help" ]; then
- echo "*** Description ***"
- echo "Takes a screenshot using slurp and grim then copys to clipboard using wl-copy"
- echo ""
- echo "*** Usage ***"
- echo "wl-screenshot"
- echo ""
- echo "*** Parameters ***"
- echo ""
- echo "*** Options ***"
- echo ""
- exit 0
- fi
- [ ! -d "$PICTURES"/screenshots ] && mkdir -p "$PICTURES"/screenshots
- PIC_NUM="$(find "$PICTURES"/screenshots/ | wc -l)"
- slurp | grim -g - "$PICTURES"/screenshots/scrn-"$PIC_NUM".png
- wl-copy < "$PICTURES"/screenshots/scrn-"$PIC_NUM".png
|