fix screenshot
This commit is contained in:
parent
d13361cf22
commit
6db9f3b125
@ -47,9 +47,9 @@ _notify_error() {
|
|||||||
|
|
||||||
_capture_select() {
|
_capture_select() {
|
||||||
local -r pipe="$(mktemp)"
|
local -r pipe="$(mktemp)"
|
||||||
grim -g "$(slurp)" - 2>"${pipe}"
|
grim -g "$(slurp 2>"${pipe}")" -
|
||||||
local -r code="$?"
|
local -r code="$?"
|
||||||
if grep -F "Selection was cancelled by keystroke or right-click." <"${pipe}"; then
|
if grep -F "selection cancelled" <"${pipe}"; then
|
||||||
rm "${pipe}"
|
rm "${pipe}"
|
||||||
return "${CODE_CANCELED}"
|
return "${CODE_CANCELED}"
|
||||||
fi
|
fi
|
||||||
@ -83,7 +83,7 @@ _process_screenshot() {
|
|||||||
|
|
||||||
if ! ${capture_func} | ${output_func} "${output_arg}"; then
|
if ! ${capture_func} | ${output_func} "${output_arg}"; then
|
||||||
if (( ${pipestatus[1]} == "${CODE_CANCELED}" )); then
|
if (( ${pipestatus[1]} == "${CODE_CANCELED}" )); then
|
||||||
_notify_low "Selection was cancelled by keystroke or right-click."
|
_notify_low "Selection was cancelled by keystroke."
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
_notify_error "${error_msg}"
|
_notify_error "${error_msg}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user