-
-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Save Text Only (Ignore Images) #134
Comments
Currently, Maccy only maintains the history of the following types https://github.com/p0deje/Maccy/blob/8d3bb5ed2c5789972f8726b8191e261f684b521f/Maccy/Clipboard.swift#L19-L24: private let supportedTypes: Set = [
NSPasteboard.PasteboardType.fileURL.rawValue,
NSPasteboard.PasteboardType.png.rawValue,
NSPasteboard.PasteboardType.string.rawValue,
NSPasteboard.PasteboardType.tiff.rawValue
] I should probably make this list configurable via preferences (with all enabled by default) so you could just disable "Images" or "Files" if you want. |
I've been working on this configuration and I would like to hear your and others' opinion on this. It's now possible to configure types of data to store: It works great for simple copies, but it's not clear what to do for more complicated ones. Imagine you have "Images" disabled and "Text" enabled. What should happen when we copy something that contains both image and text. What should happen to such copy:
An example of such a scenario is copying multiple cells in Number.app. They are copied as rich text, string, and image. Another common scenario is copying a file, which is always represented as a file URL and string with the filename. |
@clarkewd Any thoughts on ☝️? |
LGTM |
Which option exactly? 😄 I proposed 3 different ones for behavior. |
all data, and do its best to paste as was |
But then a user would still see images even though they explicitly unchecked keeping images. That seems like a bad UX. |
I'm interested in this feature mostly because I'd like to disable the storage of files in the clipboard, but giving my feedback on the question above:
I think the correct would be 3. If I want to store texts and don't want to store images, I'd like to get the textual part of the selection and get rid of the images in between. |
Sorry for the delayed reply. Your addition looks great and I think will be very helpful for folks trying to disable images. As for mixed types, I'd be in favor of option 3:
This is pretty similar to how Ditto Clipboard Manager can be setup. It has options for which types you want to store, so I was able to remove non-text formats. See below. On mixed types, it just copies the text but not the image. I also really liked that Ditto allowed me to easily paste plain text anywhere, and to set that as the default paste option, even if I had copied rich-formatted text, with their "Text Only Paste" option: So with that software my workflows were this: Normal Behavior
Plain text
Search / paste plain
Alex, thank you for your work on Maccy. It is by far the BEST, fastest, and most intuitive clipboard manager for OS X that I've found and since I found it I've been using it heavily every day. Before finding it I spent tens of hours searching, researching, testing, and comparing different clipboard managers. So thank you very much. |
Thanks for a detailed explanation, I'll wrap up the work on supported types by altering the copy entry and removing the undesirable types before pasting. |
Thank you! |
First, thank you for writing such a wonderful tool and also for making it open source☺️
It would be nice if there was an easy way to prevent things other than text from being added to the history.
For now I've added a few entries to the "Ignored pasteboard types" and this seems to be working:
I saw that Apple recognizes a type
public.image
but this didn't seem to work so I used theClipboardViewer.app
mentioned here to try and determine the types I should exclude:It was a little tricky but so far I've come up with:
I use the clipboard manager for coding so if there is an easy way to create an option to "save only text" ( text, rtf, html, etc - but not images, video, sounds, etc ) that would be ideal.
If that is too complicated maybe even just add info on the current pasteboard type to the bottom of the "Advanced" preferences tab to help in figuring out what types users could add?
Thank you again for creating such a wonderful software.
The text was updated successfully, but these errors were encountered: