Fixed shot.sh after some neglect
This commit is contained in:
parent
12ef20f681
commit
f6219cb894
|
@ -28,7 +28,7 @@ p Upload to a pastebin (defined in function)
|
|||
case ${1:0:1} in
|
||||
# Active window
|
||||
w) printf "Focus target window now...\n"
|
||||
opts="-i $(xdotool getactivewindow)"
|
||||
opts="-i"
|
||||
msgt="active window"
|
||||
;;
|
||||
# All
|
||||
|
@ -51,7 +51,8 @@ p Upload to a pastebin (defined in function)
|
|||
# Post to a pastebin
|
||||
p) destdir=$destdir/pasted
|
||||
msgd="pastebin"
|
||||
paste=1;;
|
||||
paste=1
|
||||
;;
|
||||
|
||||
*) printf "Invalid destination: %s\n" "${1:1:1}"
|
||||
return
|
||||
|
@ -63,9 +64,12 @@ p Upload to a pastebin (defined in function)
|
|||
local fpath="${destdir}/${fname}"
|
||||
|
||||
# If target is active window, give a 5 second countdown before running maim
|
||||
[[ "$msgt" = "active window" ]] && countdown 5
|
||||
if [[ "$msgt" = "active window" ]]; then
|
||||
countdown 5
|
||||
opts="-i $(xdotool getactivewindow)"
|
||||
fi
|
||||
|
||||
maim "$opts" "$fpath"
|
||||
maim $opts "$fpath"
|
||||
printf "Captured %s -> %s\n" "$msgt" "$msgd"
|
||||
|
||||
# If destination is a pastebin, do the needful
|
||||
|
|
Loading…
Reference in New Issue