blob: 9d4624eb6130a29d8aa5b1138de4475f86cfc37f (
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
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/bash
IMG_PATH=/home/carnager/Pictures/Screenshots
UL=fb
EDIT=mtpaint
prog="
fullscreen
fullscreen_delay
fullscreen_upload
fullscreen_upload_delay
fullscreen_edit
fullscreen_edit_delay
-------------
section
section_and_upload
section_and_edit
"
cmd=$(dmenu -b -l 20 -fn 'xft:profont:size=8' -nf '#999' -nb '#000' -sf '#eee' -sb '#0077bb' <<< "$prog")
cd $IMG_PATH
case ${cmd%% *} in
fullscreen) scrot -d 1 '%Y-%m-%d-@%H-%M-%S-scrot.png' ;;
fullscreen_delay) scrot -d 4 '%Y-%m-%d-@%H-%M-%S-scrot.png' ;;
fullscreen_upload) scrot -d 1 '%Y-%m-%d-@%H-%M-%S-scrot.png' -e "$UL \$f" && (xclip -o;echo) | xclip -selection clipboard ;;
#&& && $CLIP && $(echo "Screenshot Uploaded" | dzen2 -fn 'Envy Code R-10:Normal' -y 1062 -p 4) ;;
fullscreen_upload_delay) scrot -d 4 '%Y-%m-%d-@%H-%M-%S-scrot.png' -e "$UL \$f" && $(echo "Screenshot uploaded" | dzen2 -fn 'Envy Code R-10:Normal' -y 1062 -p 4) && (xclip -o;echo) | xclip -selection clipboard ;;
fullscreen_edit) scrot -d 1 '%Y-%m-%d-@%H-%M-%S-scrot.png' -e "$EDIT \$f" ;;
fullscreen_edit_delay) scrot -d 4 '%Y-%m-%d-@%H-%M-%S-scrot.png' -e "$EDIT \$f" ;;
section) scrot -s '%Y-%m-%d-@%H-%M-%S-scrot.png' ;;
section_and_upload) scrot -s '%Y-%m-%d-@%H-%M-%S-scrot.png' -e "$UL \$f" && $(echo "Screenshot uploaded" | dzen2 -fn 'Envy Code R-10:Normal' -y 1062 -p 4) && (xclip -o;echo) | xclip -selection clipboard ;;
section_and_edit) scrot -s '%Y-%m-%d-@%H-%M-%S-scrot.png' -e "$EDIT \$f" ;;
*) exec "'${cmd}'" ;;
esac
|