MatthiasGrandl/Loungy

Clipboard manager

hgezim opened this issue · 12 comments

hgezim commented

I need it now!

Looking forward to not needing raycast.

I'll add it to the todo list :)

I like to work on this!

@snhasani please hold off for now. The project is still very immature and I like to move things around a lot. I want to implement a preview for the list view next at which point a simple clipboard manager shouldn’t be too hard to implement.

I appreciate the enthusiasm though!

please look at how Alfred app has done the clipboard. I used it every day. it's super fast and quick

https://www.alfredapp.com/help/features/clipboard/

yeah that looks like what raycast is doing.

So I have looked into this a bunch. What Raycast and Alfred are doing is super hard to do cross platform (which Loungy definitely wants to be).

The only crate that comes close to this kind of functionality is Arboard but it doesn't support files or the kind of metadata we'd need for a full clipboard manager (like which app the clipboard item is from). On top of that we would need to poll for new clipboard contents and compare with existing items in the history, which is very expensive for images.

So three options:

  • build a MacOS only feature for now with Swift and worry about cross-platform later
  • build a minimalistic cross-platform clipboard manager (with only text support)
  • build a wrapper around existing clipboard managers

I'd go with 1 for now, but ideally 1 and 2. Support stuff like images and files on macOS but also implement a bare text-only clipboard manager for other platforms.

I started working on the clipboard manager and wanted to share a sneak peak:

image

I did end up going the Arboard route knowing it's limitations. Might regret that in the future, but I like that it allows us to do Linux with minimal effort and allows me to write less Swift code lol.

Quick question for the clipboard manager users:
Do you expect the clipboard history to be persisted across Loungy restarts? I feel like that is not necessary given you rarely restart a launcher and it adds quite a bit of overhead, but let me know what you think.

I think I want to use the list icons to differentiate between the types of clipboard items, similar to what raycast is doing, but I will consider it.

So it's actually quite usable now! Clipboard is persistent across restarts. Clipboard entries get pruned after 7 days (currently hardcoded). It does support text and images and cycling between types (by pressing tab). I still want to add URL, file and OCR support (that is a sick feature in Raycast).

image

OCR support for images is in. Was actually insanely easy to add thanks Apple Vision APIs…