Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

448 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fplaunchwrapper

Python utility for creating wrapper scripts that launch Flatpak applications by simplified names (e.g., firefox instead of flatpak run org.mozilla.firefox).

What It Does

Creates wrapper scripts that intelligently choose between:

  • System packages (native applications)
  • Flatpak applications (sandboxed)
  • User-defined preferences

Installation

# Install with uv (recommended)
uv tool install fplaunchwrapper

# Or with pip
pip install fplaunchwrapper

Quick Start

# Generate wrappers for all Flatpak apps
fplaunch generate ~/bin

# List wrappers
fplaunch list

# Set preference
fplaunch set-pref firefox flatpak

# Launch
firefox  # Uses your saved preference

Commands

Available executables

The project installs a main user-facing CLI and several helper standalone executables. Use the main CLI in interactive workflows and the standalone helpers when invoking specific entrypoints or from system packaging/automation.

  • fplaunch — primary CLI (recommended for interactive use): fplaunch generate, fplaunch list, etc.
  • fplaunch- — packaging-friendly helper executables (e.g., fplaunch-generate, fplaunch-systemd) that map directly to individual entry points and are sometimes referenced by packagers and man pages.

Core

fplaunch generate [DIR]         # Generate wrappers
fplaunch list                   # List all wrappers
fplaunch set-pref APP PREF     # Set launch method (system/flatpak)
fplaunch remove APP            # Remove wrapper
fplaunch launch APP            # Launch application
fplaunch monitor               # Start monitoring daemon
fplaunch config                # Show configuration
fplaunch systemd enable        # Set up automatic updates

All commands support --emit for dry-run mode.

Profiles & Presets

fplaunch profiles list              # List profiles
fplaunch profiles create work       # Create profile
fplaunch profiles switch work       # Switch profile
fplaunch presets list              # List permission presets
fplaunch presets add gaming --permissions "--device=dri" "--socket=pulseaudio"

Systemd

fplaunch systemd enable            # Enable automatic updates
fplaunch systemd disable           # Disable
fplaunch systemd status            # Check status

Wrapper Features

Each wrapper supports:

firefox --fpwrapper-help           # Help
firefox --fpwrapper-info          # App info
firefox --fpwrapper-config-dir    # Config directory
firefox --fpwrapper-sandbox-info  # Sandbox details
firefox --fpwrapper-launch flatpak # Force method
firefox --fpwrapper-set-override flatpak  # Set preference

Interactive vs Non-Interactive

Terminal: Full functionality with prompts and menus Desktop files/scripts: Auto-bypass to system command, silent execution

Force interactive mode:

FPWRAPPER_FORCE=interactive firefox --fpwrapper-help
firefox --fpwrapper-force-interactive --help

Configuration

Edit ~/.config/fplaunchwrapper/config.toml:

bin_dir = "/home/user/bin"
log_level = "INFO"

[global_preferences]
launch_method = "auto"

[app_preferences.firefox]
launch_method = "flatpak"
custom_args = ["--new-window"]

Emit Mode (Dry Run)

Test commands without making changes:

fplaunch generate --emit ~/bin
fplaunch set-pref firefox flatpak --emit
fplaunch systemd enable --emit

Add --emit-verbose to see file contents.

Development

git clone https://github.com/dtg01100/fplaunchwrapper.git
cd fplaunchwrapper
./setup-dev.sh

# Run tests (3,058 tests, 99% coverage)
uv run pytest tests/python/ -q

# Format code
uv run ruff format lib/ tests/python/

# Lint
uv run ruff check lib/
uv run flake8 lib/ tests/python/

Project Structure

fplaunchwrapper/
├── lib/                          # Python package
├── tests/                        # Test suite
├── docs/                         # Documentation
├── examples/                     # Usage examples
└── pyproject.toml               # Package config

System Requirements

  • Python 3.10+ (tested through 3.13)
  • Flatpak 1.0+
  • Linux: systemd or cron support

License

MIT

About

Utility to create wrapper scripts for Flatpak apps with conflict resolution and management

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages