maim icon indicating copy to clipboard operation
maim copied to clipboard

Preserve cursor position when using selection mode

Open JShorthouse opened this issue 3 years ago • 6 comments

Right now the cursor gets superimposed onto the screenshot at the position it was when finishing the selection.

Which means every screenshot ends up with the cursor in the bottom right like this:

screenshot

I think what would be better is:

  1. When maim is started in selection mode, immediately save the cursor position
  2. Let the user make a selection
  3. Overlay the cursor using the initial position

JShorthouse avatar Dec 09 '21 16:12 JShorthouse

       -u, --hidecursor
              By default maim super-imposes the cursor onto the image, you can disable that behavior with this flag.

Copy-pasted straight from maim man page. If you didn't notice this flag, please close this issue, if you did and you actually mean something I don't understand, please take my apologies and try to elaborate a bit more.

foxpy avatar Dec 09 '21 22:12 foxpy

Ok I will try to explain better, with a diagram.

diagram

Lets say I am trying to make a screenshot showing my mouse over a specific button. I move my mouse to where the red cursor is, and press a hotkey to open maim.

This is the position where I would like my cursor to end up in the final screenshot. I would like maim to save the cursor coordinates as soon as it is launched.

Currently the cursor always ends up where the blue cursor is (the final position after making the selection), which I don't think is very useful.

JShorthouse avatar Dec 09 '21 23:12 JShorthouse

Oh, yeah, I see what you mean. Your issue is probably not a duplicate of, but definitely closely related to #193

foxpy avatar Dec 10 '21 11:12 foxpy

Yes I agree. This issue is much narrower in scope and (I imagine) would be much simpler to implement than #193. However feature-wise it's basically a subset of #193 so if #193 was implemented then this issue could be closed.

JShorthouse avatar Dec 10 '21 12:12 JShorthouse

I have some ideas how to implement #193 but I don't currently have any free time for that. Maybe during winter holidays… :thinking:

foxpy avatar Dec 10 '21 13:12 foxpy

I have some ideas how to implement #193

Little update: during digging through scrot source code I have realized scrot works well when using selection and freeze options, so I no longer have any reasons to use maim so I will not work on this feature.

foxpy avatar Jan 25 '22 14:01 foxpy