FuzzyIdeas / Clop

Clipboard optimizer for macOS
https://lowtechguys.com/clop
GNU General Public License v3.0
520 stars 23 forks source link

Auto-optimization breaks cmd+option+v for moving files in Finder #8

Closed diogox closed 9 months ago

diogox commented 10 months ago

In Finder, when you want to move files with the keyboard, you have to use cmd+c and then cmd+option+v. There's no ctrl+x and ctrl+v workflow like in Linux and Windows.

With Clop installed, when you cmd+c an image, it creates a new optimized version. And when you cmd+option+v, it moves the optimized version to the desired location, leaving the original in place.

While I'm glad the original is safe, this breaks the keyboard-driven workflow for moving files.

I read this issue where you mention we could have the optimization happen on paste with cmd+v, but that it needs more permissions.

Personally, I'm fine with needing more permissions and would love to have this option šŸ™Œ

alin23 commented 10 months ago

In the next version (to be released) I made an important change to help with this issue:

When copying more than one file, the optimisation does not happen.

I think that would fix your use case without needing additional permissions, and a lot of complexity on my part.

Would you like to try a beta?

diogox commented 10 months ago

I appreciate your answer :)

That sounds like an improvement. While Iā€™d be happy to give it a try, moving one file is still a use case for me.

I prefer my apps to be ā€œset it and forget itā€, and this would be an edge case that Iā€™d have to keep in mind.

Tbh my ideal use case would be to have flameshot screenshots automatically optimize when I copy them to the clipboard, and nothing else. But I donā€™t see a way of doing just that šŸ¤”

Perhaps a hotkey to ā€œEnable clipboard optimization for next oneā€? But thatā€™s a different request altogether šŸ˜„

alin23 commented 10 months ago

Curious if you already know about the Pause hotkey in Clop (Ctrl-Shift-P by default). It's the opposite of what you asked for, you press it before copying a file, and Clop ignores that file.

diogox commented 10 months ago

Iā€™ve seen it, but like I mentioned, I donā€™t want to have to remember hotkeys for specific tasks.

Even with the opposite hotkey, for enabling optimization for the next clipboard, I would just write a Hammerspoon automation so I wouldnā€™t have to think about it.

Itā€™s not really feasible to do it with the Pause option :/

alin23 commented 10 months ago

So your ideal case would be:

There would be no way to paste a non-optimised image.

Am I understanding this correctly? I'd like to try an implementation but I want to be sure I have the requirements right.

diogox commented 10 months ago

Personally, I would like to only optimize images that are going to leave my computer (when I'm sending them over the network, so that they get sent faster).

I don't know if this would be everyone's use case.

So, at least for me, what you described seems mostly accurate. But if you had a way of telling when Cmd-V is being used locally (in Finder), and not trigger an optimization, that would be even better. As it would allow me to keep the original copy/paste/move functionality, while making image transfers online (mostly screenshots to illustrate a point) a lot more efficient.

Does that make sense?

As I wrote this, I actually remembered another option: If clop could watch a directory (where I can set my screenshot tool to send images automatically), and automatically optimize any new images and add them to the clipboard. That might be a simpler approach. For my use case at least šŸ¤”

alin23 commented 10 months ago

It's quite complex to identify a local vs network paste. I'll look into it.

The folder watching part is already implemented, check out Clop's settings under the Images tab.

The watched optimized files are not added to clipboard automatically yet, I have to implement that, but you can at least drag the thumbnail result.

diogox commented 10 months ago

Thanks for considering this feature, I appreciate it :)

alin23 commented 9 months ago

I decided to not add Accessibility Permissions (for now). Mostly because of time constraints, it took a lot of time to do the priority features and fixes for 2.2.0 and I have to take a break.

I added it to my todo list. Until then, 2.2.0 fixes part of this problem by: