diff options
author | Rasmus Steinke <rasi@xssn.at> | 2012-08-11 02:40:34 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2012-08-11 02:40:34 +0200 |
commit | f140a1642ebfde198946ad6760c1003c1cb9a8c3 (patch) | |
tree | 7538aa90092f99c661ec3abb4a69944767315dc5 /bin/scrotmenu.sh | |
parent | e3fd45703267ce67d8b1e1fb53a4a1b4ccda551e (diff) | |
download | dotfiles-f140a1642ebfde198946ad6760c1003c1cb9a8c3.tar.gz dotfiles-f140a1642ebfde198946ad6760c1003c1cb9a8c3.tar.xz |
scripts
Diffstat (limited to 'bin/scrotmenu.sh')
-rwxr-xr-x | bin/scrotmenu.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/bin/scrotmenu.sh b/bin/scrotmenu.sh new file mode 100755 index 0000000..a39ca0f --- /dev/null +++ b/bin/scrotmenu.sh @@ -0,0 +1,35 @@ +#!/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" && $(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) ;; + 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) ;; + section_and_edit) scrot -s '%Y-%m-%d-@%H-%M-%S-scrot.png' -e "$EDIT \$f" ;; + *) exec "'${cmd}'" ;; +esac |