blob: 3eed12bfca8f7a7703c214d63fedf17bc18476d5 (
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 [ ! -n "$1" ]; then
print_screen
fi
case "$1" in
-s)
screenshot-select ;;
*)
echo "usage: screenshot [-s]" ;;
esac
}
print_screen () {
scrot -q 100 -e 'xclip -selection c -t image/png < $f; mv $f ~/Pictures/screenshots/'
}
screenshot-select () {
sleep 0.2
scrot -l mode=edge -i -s -e 'xclip -sel clip -t image/png $f; mv $f ~/Pictures/screenshots/'
}
main "$@"
|