-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreenshot
More file actions
43 lines (34 loc) · 1.07 KB
/
screenshot
File metadata and controls
43 lines (34 loc) · 1.07 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
# A script that take a screenshot for you (=^⁻^⁼)
# @Authors: AlphaLawless and Garoze.
TIME=3000
usage() {
cat <<EOF
usage: ${0##*/} [option]
Options:
--area, -a Take a full screnshot.
--clipboard, -c Directly saves a print to the clipboard.
--save, -s Save a window or area of your choice.
EOF
}
usage
if [[ -n $1 ]]; then
case $1 in
--area | -a)
maim -u | xclip -sel clipboard -t image/png &&
notify-send -u low -t $TIME 'Cheese =^-^=' 'Screenshot has been put on the clipboard'
;;
--clipboard | -c)
maim -u -s | xclip -sel clipboard -t image/png &&
notify-send -u low -t $TIME 'Cheese =^-^=' 'Screenshot has been put on the clipboard'
;;
--save | -s)
maim ~/Pictures/$(date +%Y-%m-%d-%H-%M-%S)-screenshot.png -s &&
notify-send -u low -t $TIME 'Cheese =^-^=' 'Screenshot has been saved on ~/Pictures'
;;
*)
echo "Usage: $0 [option]"
;;
esac
fi
exit 0