hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.81k stars 449 forks source link

custom icon for mimeIcon #2419

Open Mattwmaster58 opened 1 year ago

Mattwmaster58 commented 1 year ago

First I want to thank you for this tool, it's very powerful and extremely useful to me ❤️ Is your feature request related to a problem? Please describe. I would like to implement a custom command that allows me to search for images to paste. After searching, I was planning to use the menuItems function to prompt the user to select which image they would like to paste on the clipboard. It is my understand that menu items can specify a custom icon, but it must be from a predefined list, ie in here.

Describe the solution you'd like If there's not a better way to approach this, it would be nice to be able to specify a custom icon eg encoded in base64

Describe alternatives you've considered dialog() with custom icon "Icon for custom dialog can be set from icon font, file path or theme" for each search result with a yes/no - this would be a bit clumsy

Mattwmaster58 commented 1 year ago

I've come up with a way to achieve roughly what I wanted: I created a new tab using the native CopyQ tab functionality to allow users to select items. Going to leave this open since I think it would be useful in other scenarios, but I personally wouldn't use this functionality at this time in this specific case.

Mattwmaster58 commented 1 year ago

This is how I ended up implementing my project in case anyone may find this useful: https://github.com/Mattwmaster58/os-wide-discord-emojis

hluk commented 1 year ago

menuItems() can use a image path for the icon:

menuItems([{"text/plain": "TEST", "application/x-copyq-item-icon": Dir.home() + "/Pictures/icon.png"}])