CopyQ
CopyQ copied to clipboard
Unlimited history
Hi,
The Windows open-source clipboard manager Ditto has an unique feature which I've yet to find in any Linux clipboard manager: unlimited history.
That is, there can be no limit to the number of stored entries. All entries are saved in an SQLite database, which is indexed with SQLite's excellent full text indexing. This allows incrementally searching through hundreds of thousands of clipboard entries in seconds.
I have found this to be incredibly convenient, as it means that I can always cut instead of delete anything, with the peace of mind that I can always recover it later. It also allows me to quickly paste in code snippets written any amount of time ago.
Would this be a viable feature request for this project?
Interesting. Are there any further thoughts on this?
Interested in this or is there a way to just backup all the current clipboard contents to a file every so often (once a week for example) to have a running history in a file somewhere??
@excetara2 You could move or duplicate the clipboard tab every now and then to keep the old history if that's what you mean.
@hluk Then it keeps it in memory, right? I prefer not to have it all stored in memory but just have it in a text file so at some point I can go back to find something if necessary.
@excetara2 Tabs data are loaded on-demand (the first time you access the tab) and unloaded after an interval. So there shouldn't be problem with memory and the tab data will still be easily accessible.
@hluk Okay that makes sense. I just had an images tab I was using a lot at one point taking screenshots and my memory kept spiking up with copyq so why I was worried.
It's possible to move the clipboard tab into another tab and append the contents? So I could just have one tab that is a complete running tab? Could this be triggered after like 500 items are added (eg. the clipboard size) or would it have to be time based?
@hluk:
You could move or duplicate the clipboard tab every now and then to keep the old history if that's what you mean.
Yes, but for that I need to backup the main tab, rename it, then import back. That is not very effective because I duplicate some notes but it works anyway:
cd /backup/copyq && copyq exporttab "$(date +%y-%m).cpq" && copyq renametab "&буфер" "$(date +%y-%m)" && copyq importtab "$(date +%y-%m).cpq"
And how can I search in all tabs at once? Now I can search in directory with backups or search in each tab one by one.
It would be awesome to have endless records and an easy search in its.
For example, I studied smart contracts a year ago, but now I can’t remember the command with which I launched the local version of the blockchain. I remember that there is a special parameter, which is not in the description of the command, but I really needed it. Now I need to spend hours for searching that information in google, instead of just finding this command in the buffer history. I I could find this command in the command history on the server, but this server is currently unavailable.
Also I'd like to export the entire history of the buffer and use the neural network to analyze my interests over the past 10 years, but unfortunately I can’t do it now, because the information is lost. After 20 years of life, I would like to look at the graph of my interests, but without a good data export and without an infinite buffer I can not do that. I am really surprised that the ancient program on the ancient hosting sourceforge can do that, while the modern program on the github with 2.5к stars can't.
May be it is more simple to add feature "backup tab"?
- user can enable it in settings.
- if it is enabled copyq moves entities form fully filled tabs (instead of deleting) in one scecilal tab "backup" without limits for number of entities.
- if searching in a large number of records - very slowly then you can add a separate hot keys for searching in all tabs.
ok, I created my own on elrctron :) https://github.com/morozovsk/unlimited-clipboard
any updates on this?
any updates on this?
Hmmmm, I'm wondering the same on 2021 :laughing:
I wish I had this. I've got unlimited bash history but cannot have unlimited clipboard history.
With memory capacities expanding in recent hardware, wouldn't it be possible to increase the history maybe 2x and stop worrying about running out of memory?
I would prefer a different approach. For example, konsole can handle unlimited history with negligible lag. I have no idea hot it is implemented, but I would bet on an index-based or list-based implementation. Also something like SQLite could work. It has search too. Loading all history in memory seems like a naive approach to me. But I can be easily disproved.
Either way, CB version 0.8.0 now supports a history up to 4 billion, AND it uses a filesystem storage method which uses zero memory unless you want it to.