$ show nozwock/packet
Packet is a GTK4/libadwaita desktop application for Linux that implements the Google Quick Share protocol, enabling wireless file transfer between Linux and Android devices. The application discovers nearby devices via Bluetooth and mDNS over Wi-Fi, and supports sending files, text, links, and Wi-Fi passwords. It integrates deeply with the GNOME desktop: a Nautilus plugin adds a "Send with Packet" context menu, a D-Bus API allows external control, and it can run in the background with a system tray icon. The codebase is written in Rust, using the `rqs_lib` library for the Quick Share protocol logic. The architecture follows a standard GtkApplication pattern with custom GLib object types for transfer state, asynchronous file operations using tokio, and a modular widget system for transfer cards. The code is well-structured overall, though the main window file is large and some FIXMEs indicate areas for improvement. The project has active maintenance, comprehensive localization (30+ languages), and a CI pipeline.
The LLM identified 3 files worth highlighting for reuse:
Defines a generic `FileBasedPlugin` trait and implements it for the Nautilus extension. The trait provides a clean interface for installing/uninstalling plugins by copying files to system directories. This pattern is reusable for any application that needs to manage file-based plugins (e.g., file manager integrations, system extensions).
Implements `SendRequestState`, a GLib Object subclass that encapsulates the state of an outgoing file transfer, including progress, metadata, and control flags. It uses the `Properties` derive macro to expose properties for automatic UI binding. The design cleanly separates UI from transfer logic and could be extracted as a template for any GLib-based stateful object in a Rust GTK application.
Contains `DataTransferEta`, a sliding-window average for estimating transfer completion time. It is a small, self-contained utility with a clear API (`new`, `record`, `eta`, `rate`). This pattern is reusable in any file transfer, download manager, or progress-tracking component, and demonstrates careful engineering for smooth UI updates.