blob: 04b28cdb9dcafa7f4e0cf356f15eca47cc47b05f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/sh
main () {
if [ $# -eq 0 ]; then
print_screen ; exit 0
fi
case "$1" in
-s)
selection ;;
*)
echo "usage: screenshot [-s]" ;;
esac
}
print_screen () {
scrot -q 100 -e 'xclip -selection c -t image/png < $f; mv $f ~/Pictures/screenshots/'
}
selection () {
sleep 0.2
scrot -l mode=edge -i -s -e 'xclip -sel clip -t image/png $f; mv $f ~/Pictures/screenshots/'
}
main "$@"
|