You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.
If I start to make a selection, there is no way of cancelling it. If I press ESC it does "cancel" it, but it (scrot I guess) instead screenshots the entire window.
I would like pressing ESC, or maybe some assigned key like LCTRL to cancel the upload. I don't care if scrot actually takes a screenshot, but the script should not upload it.
The text was updated successfully, but these errors were encountered:
This is due to the workaround for #1.
scrot exits with an error when it does not take a screenshot. This can be due to the mouse being trapped or due to pressing any key while taking the selection.
I'm currently nowhere near a Linux system, so I can currently not test if pressing a key exists with a different code than exiting because the mouse was trapped.
I'll test this later, though.
Currently I the script only checks if scrot ran successfully. If not, it will assume that the mouse was trapped and will then grab the entire window.
Until I can look into this, the best thing you can do is:
Alternatively you can set the edit command to "exit" or to a valid editor. In that case you could use the time it's opened in the editor to delete the file manually, or if you're lazy, resize the image to 1x1 px.
Solution would go somewhat like this:
Try to take the screenshot, if that failed, make sure we're using scrot and then check what stderr says.
If stderr matches the first example above, exit.
If it matches the second message, capture the window.
Otherwise, exit with unknown/uncaugth error.
I have a few other plans of more features that require changes anyway, so I'll probably push that along with those.
If I start to make a selection, there is no way of cancelling it. If I press
ESC
it does "cancel" it, but it (scrot I guess) instead screenshots the entire window.I would like pressing
ESC
, or maybe some assigned key likeLCTRL
to cancel the upload. I don't care if scrot actually takes a screenshot, but the script should not upload it.The text was updated successfully, but these errors were encountered: