Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- url=""
- if [[ $1 == ?(-)+([0-9]) ]]; then
- echo "taking photo in $1"
- if [ -z "$2" ];
- then
- url='%Y-%m-%d_$wx$h_scrot.png'
- scrot -u -d $1 '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f /srv/http/img/'
- else
- echo "$2"
- url="$2"
- scrot -u -d $1 "$2" -e 'mv $f /srv/http/img/'
- fi
- else
- clear="clear"
- if [ -z "$1" ];
- then
- echo "please select an area"
- url='%Y-%m-%d_$wx$h_scrot.png'
- scrot -s '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f /srv/http/img/'
- else
- if [ "$1" = "$clear" ];
- then
- rm /srv/http/img/*
- else
- echo "please select an area"
- echo "$1"
- url="$1"
- scrot -s "$1" -e 'mv $f /srv/http/img/'
- fi
- fi
- fi
- echo "http://68.107.226.229:8182/img/"$url | xclip -selection clipboard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement