Skip to content
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

Clipboard manager #1

Open
hgezim opened this issue Feb 7, 2024 · 12 comments
Open

Clipboard manager #1

hgezim opened this issue Feb 7, 2024 · 12 comments

Comments

@hgezim
Copy link

hgezim commented Feb 7, 2024

I need it now!

Looking forward to not needing raycast.

@MatthiasGrandl
Copy link
Owner

I'll add it to the todo list :)

@snhasani
Copy link

snhasani commented Feb 7, 2024

I like to work on this!

@MatthiasGrandl
Copy link
Owner

@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!

@gianpaj
Copy link

gianpaj commented Feb 9, 2024

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/

@MatthiasGrandl
Copy link
Owner

yeah that looks like what raycast is doing.

@MatthiasGrandl
Copy link
Owner

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

@uncenter
Copy link

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.

@MatthiasGrandl
Copy link
Owner

MatthiasGrandl commented Mar 3, 2024

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.

@hgezim
Copy link
Author

hgezim commented Mar 3, 2024 via email

@MatthiasGrandl
Copy link
Owner

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.

@MatthiasGrandl
Copy link
Owner

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

@MatthiasGrandl
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants