DeedleFake / trayscale

An unofficial GUI wrapper around the Tailscale CLI client.
MIT License
392 stars 14 forks source link

Support initiating taildrop by opening file in Trayscale #134

Open Jacalz opened 4 days ago

Jacalz commented 4 days ago

Similar to how you can share files, images etc. on iOS to the Tailscale app in order to initiate a taildrop, it would be nice to integrate the same kind of functionality in Trayscale. You could then for example open Nautilus and then select a file (or folder) to open in Trayscale. This could then bring up a window to select which device to send to.

The idea is basically the same as what is shown in the macOS videos here: https://tailscale.com/kb/1106/taildrop

I implemented something similar in my application Rymdport in and it should more or less be as simple as adding a %F (or %U) to the desktop file's Exec parameter (https://github.com/Jacalz/rymdport/commit/ccc2a701a8c18bd581cd8aa3a5fa4ec3c0719d0b) and then updating the application to read the command line parameters. I suppose it might be doable with DBUS to pass the information to a running Trayscale instance as well but I haven't looked into how that works.

DeedleFake commented 4 days ago

I think Gtk can take care of the passing arguments to an existing instance. It already takes care of deduplicating instances as is, and the existing GtkApplication instance can be "activated" when there's an attempt to start a new instance. I'm pretty sure that it lets you pass some arguments to the existing instance when that happens. I'll have to look into the APIs involved.

Jacalz commented 3 days ago

Sounds good. Didn't know that Gtk handled all that. I might have to steal some of those ideas and integrate them into Fyne :)