schlagmichdoch / PairDrop

PairDrop: Transfer Files Cross-Platform. No Setup, No Signup.
https://pairdrop.net
GNU General Public License v3.0
4.45k stars 249 forks source link

enhancement: MacOS background app with file handler #90

Open anonymousaga opened 1 year ago

anonymousaga commented 1 year ago

I was wondering if there could be an electron-kind of the system to make the pair drop always visible and sendable to. For example, I'd like to see a way to have this open on boot (electron app with menu bar and notify?) in the background and send a notification when a file comes in.

schlagmichdoch commented 1 year ago

Currently, there is no electron like app yet that connects to pairdrop.net and enables background notifications.

There is an Electron app based on PairDrops predecessor though with a different focus: It is self contained and replaces the Snapdrop server but has no internet transfer so it only works if devices can find each other on the same network: https://github.com/JustSch/node-snapdrop-electron/tree/main

Maybe that could be a good starting point though if we include an additional option to choose between using it in the self contained server mode and using it as a client with a background service. I thought about combining everything into a PairDrop app but I need to add encryption to the websocket fallback before I will be working on that.

Additionally, there is a Firefox Addon with a background service that shows notifications when a file comes in: https://github.com/ueen/SnapdropFirefoxAddon I'm not sure though, whether the background service is compatible with PairDrop yet.

rohsaurus commented 11 months ago

I think this could be like a cool like gnome applet or something for linux with I'm guessing similar functionality to the MacOS version discussed above. I unfortunately don't have experience with gtk or whatever would be needed for this, but I think if anyone has an idea on how this could be implemented, I'd be willing to explore it!

rohsaurus commented 11 months ago

To use the full potential of WebRTC and increase transfer speeds, I plan to wrap the existing code base in a flutter app to create clients for all platforms. To prevent having to rewrite the client logic and GUI in Flutter (which would be a complete rewrite), I think of simply using a webview to render the exisiting client files (html, javascript, css).

There is also a package to add a system tray to a flutter app: https://pub.dev/packages/system_tray

What would you like the tray menuto look like? I think of sth. like

  • Toggle app window
  • Send files
  • Send copied text
  • Stay visible if PairDrop runs in background (✓)
  • Open PairDrop on system startup ( )

What do you think? Any other ideas?

I think that's a good idea! This would also allow for easy way to access pairdrop especially on android, via the quick settings menu. It could easily be registered as a toggle that would open the application or something. I don't know what airdrop settings are on mac, but I was thinking copying something like that, which seems to be what you're doing too. Maybe also adding a direct link to the permanent pair function, as that seems to me the biggest differentiator between pairdrop and other solutions.

Let me know what you plan on doing - I'd be willing to work on this too, as I've actually worked with flutter before and have a decent background in it.

schlagmichdoch commented 5 months ago

The following comments were deleted by GitHub (via hubot) as part of mistakenly marking this account as spam on 17th February 2024. The correct thread order and the creation date is unclear. I decided to manually restore them anyway in order to complete the information this issue holds even though the restored information might be outdated:

Comment by @schlagmichdoch:

To use the full potential of WebRTC and increase transfer speeds, I plan to wrap the existing code base in a flutter app to create clients for all platforms. To prevent having to rewrite the client logic and GUI in Flutter (which would be a complete rewrite), I think of simply using a webview to render the exisiting client files (html, javascript, css).

There is also a package to add a system tray to a flutter app: https://pub.dev/packages/system_tray

What would you like the tray menuto look like? I think of sth. like

What do you think? Any other ideas?