Skip to main content

Simple script for manage browser's profiles.

Project description

linux Hatch project pre-commit PyPI - Version linting - Ruff code style - Ruff types - Mypy License - MIT

Profile Launcher

A Python Script for Effortless Browser Profile Management

⭐ About

This Python script simplifies launching browser profiles by automatically retrieving profile information from each browser's config directory. It presents these profiles as launch options, saving time and enhancing workflow, especially for users who frequently switch between multiple profiles.

⚡️ Requirements

📦 Installation

Using pipx (recommended)

$ pipx install pybrowsers-profiles

pipx Homepage

Using pip install

# Clone repository
$ git clone "https://github.com/haaag/PyBrowsers"
$ cd PyBrowsers-Profiles

# Create virtual environment & source
$ python -m venv .venv && source .venv/bin/activate

# Install deps
$ (.venv ) pip install -r requirements.txt

# Install script in local environment
$ (.venv ) pip install .

🚀 Usage

$ pybrowsers --help

usage: pybrowsers [-l] [-d DISABLE] [-e ENABLE] [-f] [-t]
                  [-m MENU] [-v] [-V] [browser] [-o URL]

Simple script for manage browser's profiles

options:
    browser             Browser name
    -e, --enable        Enable browser
    -d, --disable       Disable browser
    -u, --url           Open <URL> in browser
    -l, --list          Show browsers list and status
    -t, --table         Show browsers list with detail
    -m, --menu          Select menu (default: dmenu)
    -f, --found         Browsers found
    -V, --version       Show version
    -h, --help          Show help
    -v, --verbose       Verbose mode

locations:
    $HOME/.local/share/pybrowsers

Use no flags to launch menu

# Open menu with browsers found
$ pybrowsers

Use flag browser for browser's profile

# Open menu with profiles list
$ pybrowsers firefox

Use flag -o, --open for launching profile with url

Use flag -m, --menu to specify the launcher you want to use (default: dmenu)

Use flag -l, --list for status


Use flag -d, --disable or -e, --enable

# Disable browser (won't appear in `browsers found`)
$ pybrowsers -d firefox

# Enable browser
$ pybrowsers -e firefox

Use flag -r, --running

Supported on: 🦊

This flag will show all running browsers and profiles, as long as it has been opened with pybrowsers.

➕ Add Browser

You can add a browser creating a JSON file in $XDG_DATA_HOME/pybrowsers/ or ~/.local/share/pybrowsers

Example

{
  "name": "LibreWolf",
  "command": "librewolf",
  "path": "~/.librewolf/profiles.ini",
  "engine": "gecko",
  "enabled": true
}

🌐 Browsers

🧰 Dependencies

🧰 TODO

  • Create interactive menu for adding browser data
  • Update screenshots
  • Add flag for open URLs
  • Please, use pathlib.Path
  • BUG: Issue when the profile name contains spaces
  • Add support for JSON files (prioritize)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybrowsers_profiles-0.0.12.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

pybrowsers_profiles-0.0.12-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file pybrowsers_profiles-0.0.12.tar.gz.

File metadata

File hashes

Hashes for pybrowsers_profiles-0.0.12.tar.gz
Algorithm Hash digest
SHA256 61cfc50de260f630f9f900d1e8e20798efd8751fb9e0e370751d97119927ec22
MD5 77fa63146be58d6e146c9f8074f00471
BLAKE2b-256 3e2f34697e34db90ea73bb2ee104bdabf7e8b9e145e48d88b20581664aa8e25a

See more details on using hashes here.

File details

Details for the file pybrowsers_profiles-0.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for pybrowsers_profiles-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 e8356ccd0d123b0e15787710be3e9f7be4782a592b7cbb18f28118f44948afaf
MD5 a756f5265a029b011ab9ede7c612afc3
BLAKE2b-256 295c592496cdcc4a23e694904487179bd8f834aa7ee26c31ab9e35942f86a142

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page