This repository provides a GNOME Nautilus (Files) extension that allows users to define custom context menu actions, replacing the defunct 'filemanager-actions' project. The extension is implemented in Python using nautilus-python and GObject introspection, supporting two modes of command interpolation (v1 legacy and v2 improved), shell and native tokenization, and extensive filtering based on file type, mimetype, path patterns, permissions, and custom conditions. A graphical configurator is provided as a local web application served by a Python HTTP server, featuring a JSON Schema-driven UI built on a forked json-editor with Ace code editor integration, running entirely locally with no external network calls. Architecturally, the system consists of two main components: the Nautilus extension (Python) and the configurator (Python HTTP server + HTML/JS frontend). The extension hooks into Nautilus via the MenuProvider interface, loads configuration from a JSON file, builds menu items recursively with filtering, and executes commands via subprocess. The configurator is a standalone HTTP server that serves the UI, reads/writes the config file, and can restart Nautilus. Communication between the two is file-based (config.json), with the extension polling for changes every 30 seconds. Key reusable components include a tokenizer for shell and native command lines with context-aware escaping, a placeholder expansion engine with singular/plural support, a config loading and normalization pipeline with validation, and a UI model transformation pattern for schema-driven interfaces. The code is well-structured but lacks automated tests and relies on vendored third-party JavaScript libraries.
Gear Lever is a GNOME desktop application for managing AppImage files on Linux. Its core function is integrating AppImages into the desktop environment by extracting them, generating .desktop entries with metadata and icons, and keeping them updated. It supports one-click install from downloaded AppImages, drag-and-drop integration, in-place version updates from multiple sources (GitHub releases, GitLab, Codeberg, Forgejo, FTP, and static URLs), side-by-side version retention, per-app environment variables and exec arguments, and bulk update operations. The application is distributed primarily as a Flatpak on Flathub and also ships a headless CLI (src/Cli.py) matching most GUI operations such as integrate, update, remove, list, and fetch-updates. Architecturally, this is an event-driven GTK4/Adwaita desktop application written in Python. The main window (GearleverWindow) uses Adw.Leaflet navigation with a drag-and-drop overlay, and views communicate through custom GObject signals. The core lifecycle logic lives in AppImageProvider, which handles download, extraction, desktop-entry generation, and launch. Extraction uses a fallback chain (dwarfs → 7zz → unsquashfs → appimage-extract) to handle the fragmented AppImage format landscape. Update sources are abstracted behind an UpdateManager ABC with separate backend classes per hosting platform. Configuration is split between a global JSON settings store and per-app INI files, with a migration path from an older JSON schema. Background work is managed through custom async/idle/debounce decorators that marshal tasks onto worker threads and safely return results to the GTK main loop. The system relies on external runtime binaries (7zz, dwarfsck, dwarfsextract, unsquashfs, readelf, strings, file, get_appimage_offset) in addition to Python packages (dbus-python, pyxdg, ftputil, requests, desktop-entry-lib). Notably, the repo embeds a demo.AppImage binary used as a test fixture, illustrating the extraction pipeline against a real-world AppImage. Test coverage is thin — only CLI integration tests that download actual AppImages — and the codebase shows some legacy baggage (ftputil, direct D-Bus usage, fragile external-tool version assumptions). Nonetheless, the code is modular, actively maintained with nightly builds, well-internationalized (16 languages), and demonstrates real craftsmanship in its abstraction layers.