Tested changes! No more mktemp
This commit is contained in:
parent
80ae0480b3
commit
28fd9cddde
8
sup
8
sup
|
@ -47,7 +47,7 @@ sup.mktemp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sup.scrot() {
|
sup.scrot() {
|
||||||
local tmp_file_name
|
local tmp_file
|
||||||
|
|
||||||
[[ "$scrot_exec" ]] || { scrot_exec=`which scrot`; }
|
[[ "$scrot_exec" ]] || { scrot_exec=`which scrot`; }
|
||||||
[[ "$scrot_exec" ]] || {
|
[[ "$scrot_exec" ]] || {
|
||||||
|
@ -58,14 +58,14 @@ sup.scrot() {
|
||||||
[[ "$flag_scrot_fullscreen" ]] || { scrot_args+=( '-s' ); }
|
[[ "$flag_scrot_fullscreen" ]] || { scrot_args+=( '-s' ); }
|
||||||
[[ "$cfg_scrot_delay" ]] && { scrot_args+=( "-d $cfg_scrot_delay" ); }
|
[[ "$cfg_scrot_delay" ]] && { scrot_args+=( "-d $cfg_scrot_delay" ); }
|
||||||
|
|
||||||
tmp_file_name="$(sup.mktemp "${cfg_tmp_dir}" "${cfg_screenshot_ext}")"
|
tmp_file="$(sup.mktemp "${cfg_tmp_dir}" ".${cfg_screenshot_ext}")"
|
||||||
|
|
||||||
scrot "${scrot_args[@]}" "${cfg_tmp_dir}/$tmp_file_name" || {
|
scrot "${scrot_args[@]}" "$tmp_file" || {
|
||||||
sup.err "Failed to take a screenshot."
|
sup.err "Failed to take a screenshot."
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "${cfg_tmp_dir}/$tmp_file_name"
|
echo "$tmp_file"
|
||||||
}
|
}
|
||||||
|
|
||||||
sup.exclude() {
|
sup.exclude() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user