pybrowsers-profiles

Simple script for manage browser's profiles.


Keywords
dmenu, firefox, librewolf, profiles, rofi, bash-script, browser, chrome, chromium, effortless, firefox-profile, gecko, profile, python, python-script, waterfox
License
Other
Install
pip install pybrowsers-profiles==0.0.11

Documentation

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.

📦 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
$ pip install .

⚡️ Requirements

🚀 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
    -l, --list          Show browsers list and status
    -t, --table         Show browsers list with detail
    -m, --menu          Select menu (default: dmenu)
    -f, --found         Browsers found
    -o, --open          Open <URL> in browser
    -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

➕ 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)