Improving clipboard history

Hi

For the last couple of months I've been doing a ton of development and devops work and I find I'm using clipboard history even more than I ever did before. Dozens or hundreds of times a day.

BTT's clipboard history has some major advantages over competitors (like Alfred). But it also has some downsides and annoyances. So right now I can't find one clipboard history that does everything I want perfectly.

Alfred's advantages are: substring search; easy search for images; I can search in CAPITALS without problems; I can specify images stay in history for less time than text; the history always starts at the top, regardless of past searches.

BTT's advantages: customisable window size so I can make search and results really big - this is the main thing that keeps me using BTT's history; editable history entries - I don't use it often but when I do it's really useful; up to 365 days history - it still pisses me off that the Alfred creator refused to implement this!

I'd love if BTT could be improved to finally be the one clipboard history to rule them all. To that end, here are my requests:

1. Substring matching on each individual word of search term.

So each space-delimited word is searched as if entered like: .*term1.*term2.*. Perhaps with on/off option in settings.

Example, I am searching history for:

python /workspace/ProcessQuantization/process_quantisation.py -c ./config-camel-33b.yaml -b /workspace/process -lb /workspace/git/llama.cpp

and I want to be able to find it by typing: python quant or python camel-33b or /workspace git llama etc.

I often find myself trying to find something in BTT clipboard, then realising I can't remember the exact text, so I close BTT and open Alfred clipboard instead to find it more easily there.

2. Typed text should always go into search box, including capitals and punctuation.

This regularly bugs me and slows me down.

I want to search for CUDA_VISIBLE_DEVICES so I instinctively type CUDA and BTT doesn't search, instead it jumps to the first entry matching C, then the first matching U, etc.

Likewise searching for # as the first character also causes it to jump to an entry, not actually entering # in the search box.

I know the search is case-insensitive, but when I'm used to typing CUDA I automatically enter that into search as well. Currently I have to try and remember not to use capital letters or special characters, slowing me down.

Please make it (optionally) so that any/all text entered goes to search box, disabling the feature that jumps to entries based on their starting letter (is that even needed when we have full text search? Maybe it's a bug?)

3. Hotkeys for top ten entries, eg Cmd-1 for top entry, Cmd-2 for second, etc.

When pressed, auto-pastes that item (perhaps with option to switch between auto-paste vs auto-jump-to-entry)

4. Search for images and files

Eg a search for image matches images and file matches files, or maybe image: and file:. Some text-based search system.

Again, Alfred supports this and it's really useful when I know I took a quick screenshot to clipboard 45 minutes ago which is now 10 pages down the clipboard history page.

I think we talked about this last year and you were interested in implementing it then.

5. Option to prevent history window from auto jumping to last searched option

This is an feature which 5% of the time is really useful. The other 95% of the time it can be a major pain. I open history, search for Thing X, paste it. Then 5 minutes later I have copied some more things and I open history again. My brain expects to be at the top of the list, looking at the most recent of the 5 new things. But instead the history jumps down to Thing X, which could be dozens of pages down.

A couple of times this has resulted in me pasting the wrong thing in the wrong place, like pasting an entire email into an SSH session!

Please provide a way to disable this. Or ideally, some way to get either option when desired. Eg the ability to use a different hotkey when I want to jump back to last item.

6. Separate "Keep items in history" fields for text vs images vs files

We discussed this a while back, over a year ago I think. It'd still be useful. My clipboard history is actually smaller than I expected it to be at around 103M text and 175M 'external files' (I assume this is the images and files). But there's no way I'm going to use an image I pasted 300 days ago, so it's just wasting cycles having it still in there.

I'd like to be able to specify:

  • Text: 365 days
  • Files: 14 days
  • Images: 7 days

(or if necessary files and images could be the same category, in which case I'd do 14 days)

Sorry for the long list but this stuff has been bugging me for months and I just finally got the time to document it all!

Thanks very much

TB

Great ideas! (sorry no eta, but I'll look into this)

1 Like

I guess for wish 3 there is already some kind of solution. If the clipboard manager is visible, then paste the first clipboard with ⌘+1. I have not tested this, but with the Advanced Conditions, the arrow keys and Enter it should work ... I think.

What I would like is to be able to create an empty clipboard to write text there. Until now I have to delete the text of an existing one and write new text. Also good, but the other would be better :slightly_smiling_face:

Edit:

Ok, I tested out of curiosity. It works as expected. This pastes the second clipboard with ⌘+2

2 Likes

Does that mean you add the option to create an empty clipboard?

Yes, I like that

1 Like

This is already possible using the predefined action "Paste Specific Items From Clipboard Manager" and binding the advanced trigger condition "BTTClipboardManager == 1" to it, so it only triggers if the clipboard manager is active:

1 Like

Oh, much better :joy:

You could kind of achieve that by sending an up arrow when triggering the clipboard manager so the search box gets activated:

1 Like

Ah, but then it would make sense to number the manager's clipboards. 1, 2, 3 ... No?

Thank you! Sending up arrow works really well actually, pretty seamless. There is a noticeable delay before it moves focus but it's usable.

And I'd forgotten there were already actions for pasting specific items. That's really nice actually because then I can also paste items also without the clipboard history open, when I know for sure what's in slot 2.

FYI there appears to be a bug here. Here's my action:
image

And here's what I get when I hit the associated key, with "Sending up" in second place in history:

[img]Sending up [/img]

It appears to always be applying this clipboard transformer I created years ago:

Even though it definitely was not selected under "OR choose one of your custom Java Script Clipboard Transformers".

Not a big deal for me, I just deleted the transformer because I've not used it years; I used it when I was regularly posting to forums which is no longer the case. But it would be annoying for someone who had transformers defined they wanted to keep.

Thanks for the quick replies, it's good to get those two issues resolved quickly.

The automatic arrow key up also solves #5 - the up arrow both focuses the search box, and jumps to the top of the history list, so I no longer find myself unexpectedly at entry #14343 in the list when I expected to be at the top.

EDIT: just to add that while this workaround is much better than I had before, there are still issues with it, and it feels quite clunky waiting half a second for it to focus the search bar. So I hope there will be options added so the up-arrow isn't required.

@TheBloke Maybe you are also interested in such a solution.

Thanks Frank, that's an interesting option. Thanks for sharing.

But I'm quite liking the paste item 2, paste item 3, paste item 4 workflow, which I've bound to Hyper-2, 3 and 4, usable everywhere. I've used it several times today already.

By the way, just wanted to add that although the "send up arrow to clipboard" is working OK as a workaround, it does have some problems. The delay before up arrow is sent is quite long, and sometimes I open the clipboard history knowing I want to scroll down the list, so I hit my hotkey then immediately hit arrow down, and that gets undone by the automatic up arrow.

So just to mention that for me the workaround doesn't remove the need for item 2 - I'd love an option for "Focus search bar on load" or whatever option.

Also I wanted to add a separate entry for:

7. Move clipboard history settings to Actions, thus allowing different settings per trigger

Like how Screenshot is implemented, so we can customise its behaviour according to the trigger used. The underlying history would always be the same of course, but the settings could vary according to trigger. This would allow multiple simultaneous history windows.

Today I tried experimenting with the new-ish options to keep Clipboard History always visible, and combining that with my new paste-item-2, 3, etc options.

It worked quite well some of the time. But then I would find myself looking at another monitor and wanting to view my clipboard history, and now I have to turn to the other monitor to look at it.

What I want to be able to do is have my main clipboard history shortcut always bring up a clipboard history window at cursor which disappears on paste. And then be able to define another trigger that launches a second window which I would then pin and leave visible somewhere.

Then I can have the best of both worlds. An always-visible history in one corner of one screen, but also an on-demand history that goes away once used.

Thanks

I will definitely add an option to focus the search field & I like the idea of adding action based clipboard history settings!

1 Like

@TheBloke Not exactly what you want, but the clipboards can at least be displayed (on demand) in the notch bar when a modifier is pressed and held. They appear on all screens and disappear again when the modfier is released.

@Andreas_Hegenberg Action based clipboards are a very good idea. Or maybe a widget for the floating menus?

@frank1 just a little terminology correction as I got confused: you refer to the "clipboard items" as "clipboard", but the clipboard is the thing that holds all the various clipboard items :slight_smile:

The floating menu widgets will soon be added and there will definitely be a clipboard widget - however it is won't be a full replacement for the clipboard manager window, more like a "quick access" for the most recent items.

Ok, yes, I mean the "clipboard items". They can be displayed in the menu bar and easily pasted. :slightly_smiling_face:

1 Like

I just experienced a clipboard history bug that I've had a few times before as well, and figured out how to re-create it.

When editing an existing clipboard entry (which is a great feature, really useful sometimes) after having searched, there's a really annoying bug where every time I type a character, the cursor jumps to the end of the entry.

Steps to re-create:

  • search clipboard history for something
  • edit one of the matching entries

Bug demonstration:

In the demo you'll see another problem/confusion which I think is also specific to search: I start editing and it makes a copy of the entry, but it then doesn't select the copied entry. So I find myself unable to continue the edit I just started, until I manually select the new copy at the top of the history list.

It's been five months - can this be prioritised soon?

Thanks

I use this function in Maccy all the time, very handy:

(And it's just CMD + number as well, without shift)