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

Browsers

Installation

Using uv

$ uv tool install pybrowsers-profiles

Using pipx

$ pipx install pybrowsers-profiles

Using pip install

# Clone repository
$ git clone "https://github.com/mateconpizza/pybrowser"
$ cd pybrowsers

# 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

Add Unsupported Browser

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

Example

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

// chromium based
{
  "name": "Helium",
  "command": "helium",
  "path": "~/.config/helium/Local State",
  "engine": "blink",
  "enabled": true
}

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

Dependencies

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.14.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pybrowsers_profiles-0.0.14-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pybrowsers_profiles-0.0.14.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.8 HTTPX/0.28.1

File hashes

Hashes for pybrowsers_profiles-0.0.14.tar.gz
Algorithm Hash digest
SHA256 9e17e8e2b4226e8d1cbf63143624692293f654abd8e06fea59bc9adac8caac47
MD5 877fc559cd3c5881a5322969555d7575
BLAKE2b-256 745761cb1f9df79a7ac318beb576115f9fc234902058fe30fcb7176c2b0fcf9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pybrowsers_profiles-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 2926fe4e145d3543435e65330dd8c66f51fe553c1aa0ce8dd9cd826ac5043b16
MD5 d8a22e79d3265ddba0d24f26d4cca943
BLAKE2b-256 9f45cfe2b4054990e8ed8d9e41bddffe1774638d8a1d4ae6705a5cd2e83e93f3

See more details on using hashes here.

Supported by

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