-
Notifications
You must be signed in to change notification settings - Fork 432
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
How can I remove all of the images from CopyQ, yet keep all of the text? #1687
Comments
To remove all images from current tab:
I think much better way is to automatically store images in a separate tab: [Command]
Automatic=true
Command="
copyq:
var imageTab = '&Images';
function startsWith(text, what) {
return what === text.substring(0, what.length)
}
function hasImageFormat(formats) {
for (var format of formats.values()) {
if (startsWith(format, 'image/'))
return true;
}
return false;
}
var formats = dataFormats();
if (hasImageFormat(formats)) {
setData(mimeOutputTab, imageTab);
}"
Icon=\xf302
Name=Image Tab |
That worked. Thank you!
I agree with you. Therefore, I appended What do you think I did wrong? |
By the way, I am using CopyQ |
Also, here are some error messages I received immediately after I pressed |
That won't work. It is an "automatic" command which means that is triggered on new clipboard content, not on a shortcut. |
It does not work "automatically" for me. In other words, images show up on my |
Are there any errors in logs (F12 shortcut from main window)? Maybe some other automatic command is interfering? |
Please see... https://controlc.com/3c791fb5 When I use the code you provided to me in #1687 (comment) the following pops up on my screen immediately after I copy a screenshot... https://i.imgur.com/M4cPjCb.png
How would I go about determining if another automatic command were interfering? |
Have you tested the code in #1687 (comment)? Does it work properly for you? |
Yes. Did you copy the command code (starting with Are you using a recent CopyQ version? |
Thanks for letting me know. I appreciate that.
I am using...
|
Sorry I missed the screenshot. BTW, I think you can paste screenshots directly on github comment which would show a small preview. Can you update to new version of CopyQ? You can install the latest version from PPA. Otherwise you would need to change the for (var i in formats) {
if (startsWith(formats[i], 'image/'))
return true;
} |
That worked! Thank you! I was able to rename the tab from However, I want two tabs that look like this.. Finally—ideally, but not necessarily—I'd like to be able to change the font color and background color of the tabs. |
Make sure you change the
This also needs to be changed in configuration "Tab for storing clipboard", under History tab. I'll try to improve this.
You need to change the colors in Appearance config tab (enable "Set colors for tabs, tool bar and menus" option and you can click Edit Theme button to modify separate GUI elements or edit style sheet files directly). For more info, see: https://copyq.readthedocs.io/en/latest/theme.html Please open separate issue on github if you have another question. |
First and foremost, thanks for spending your time to work with me on this issue. I appreciate that very much.
Thanks. Yes. Of course, I had already done that in order to rename the tab from "images" to "Images Clipboard".
Clearly you meant "Preferences" not configuration. I hunted around for "configuration" initially but, well, of course, I didn't find "configuration" because it does not exist.
I want to ensure we understand one another. To me at least, it seems that the user should be able to right mouse click on the tab and rename it. Does that make sense to you? In other words, perhaps it makes sense to you, but to me it seems utterly bizarre to go to
I just glanced at it. I'll try actually implementing it a custom theme when I have a chance. I urge you to include a link to a site such as... https://htmlcolorcodes.com/color-picker/ which a little explanation indicating something like..
Why did I bother mentioning the steps above? I remember about ten years or ago, when I finally figured out this "hexadecimal color thing" and "Don't double-click on .XML files because they will open in Firefox or Google Chrome (whichever was my default browser at the time)", I was annoyed. I was thinking to myself, "Uh. Yeah. Right. Look. Mr. Developer. Ok? To us 'non-engineers' we have no idea whatsoever how to find the hexadecimal value of a color. We don't think about base 2, base 16 or any of that stuff either. And look. We ordinary users normally simply double-click to open files in order to edit them. And yeah. We sometimes 'mess up' when we edit files. Therefore, having us make a backup in advance can be helpful. Therefore, please spend a few minutes and explain this to us." Please don't be offended. I know this is a FOSS project for which you volunteering your time. I think CopyQ is great. But this last feature remind me of... This Is What Happens When You Let Developers Create UI "Deep down inside every software developer, there's a budding graphic designer waiting to get out. And if you let that happen, you're in trouble. Or at least your users will be, anyway..." It seems to me that to change the color of a tab a user should right click on the tab. Specifically, when a user right mouse clicks on the tab labeled "Sheet1", the user sees an option to change the tab color. That method works in LibreOffice Cal, Google Sheets, and Microsoft Excel. Put simply: at least in the "world of spreadsheets" that method for changing the tab color appears to be a standard. In my mind, it's also a "solved problem"; meaning, it's a problem that has been solved elegantly. Therefore—it seems to me—that it should be added to CopyQ. However, in case it would be too much work for you to add it to CopyQ, then I suggest adding an option named, "Change Tab Color" to the menu that appears when a user right clicks on a tab, by which I mean this menu... with a link to the appropriate section of https://copyq.readthedocs.io/ which explains how to change the color of a tab. Of course please feel free to add the following to discussions if you like it. Finally, I think that it would be nice—but of course not necessary—if CopyQ were to have a Setup Wizard. I imagine one of the options in that set up wizard would be "Would you like two separate clipboards: one for text and one for images? (Having these two separate clipboards tends to be very helpful if you frequently copy text and frequently copy images but probably isn't necessary if you, for example, frequently copy text but rarely copy images)." Another question, I imagine, would be, "Would like the fonts of your clipboard tab(s) to have a custom foreground and/or background color? Here is an example of default clipboard tab [an image of the default clipboard tab would be inserted here]. Here is an example of a clipboard tab with a gold font on a dark blue background: [an image of a clipboard tab with a gold font on a dark blue background would be inserted here]. If so, you may choose them by doing the following..." |
How can I remove all of the images from CopyQ, yet keep all of the text?
I fruitlessly perused the CopyQ issues here on github, the CopyQ documentation, as well as Stack Overflow.
In case it matters, here's my use case...
Sometimes I'll spend a couple of hours copying and pasting many images. During that time I want those images kept in CopyQ. However, when I am done with my session—that is, a couple of hours copying and pasting—I want to remove all of the images from CopyQ, yet keep all of the text.
The text was updated successfully, but these errors were encountered: