MatthiasGrandl / Loungy

Loungy is a WIP launcher in the vein of Spotlight, Alfred, Raycast.
MIT License
1.35k stars 70 forks source link

Clipboard manager #1

Open hgezim opened 4 months ago

hgezim commented 4 months ago

I need it now!

Looking forward to not needing raycast.

MatthiasGrandl commented 4 months ago

I'll add it to the todo list :)

snhasani commented 4 months ago

I like to work on this!

MatthiasGrandl commented 4 months ago

@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 commented 4 months ago

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 commented 4 months ago

yeah that looks like what raycast is doing.

MatthiasGrandl commented 4 months ago

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:

uncenter commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

Nice!

Can you include the app icon in the list?

On Sun, Mar 3 2024 at 01:14, Matthias Grandl < @.*** > wrote:

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

image.png (view on web) ( https://github.com/MatthiasGrandl/Loungy/assets/50196894/498aa79d-4b5a-44ed-891d-7d4481c3b5b2 )

I did end up going the Arboard 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.

— Reply to this email directly, view it on GitHub ( https://github.com/MatthiasGrandl/Loungy/issues/1#issuecomment-1975082404 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAA6OA3JU6K5TAWVVUZDFH3YWLLX7AVCNFSM6AAAAABC6KGHLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZVGA4DENBQGQ ). You are receiving this because you authored the thread. Message ID: <MatthiasGrandl/Loungy/issues/1/1975082404 @ github. com>

MatthiasGrandl commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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