summaryrefslogtreecommitdiff
path: root/.local/bin/screenshot
blob: 6d658986164f2423a684295f96db9f31d913f558 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

if [ ! -n "$1" ]; then
    scrot -q 100 -e 'xclip -selection c -t image/png < $f; mv $f ~/Pictures/screenshots/'
fi

while [ -n "$1" ]; do # while loop starts
    case "$1" in
        -s) 
            sleep 0.2
            scrot -l mode=edge -i -s -e 'xclip -sel clip -t image/png $f; mv $f ~/Pictures/screenshots/' 
            ;;
        *) echo "Option $1 not recognized" ;;
    esac
    shift
done