Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haaag/pybrowsers
A Python Script for Effortless Browser Profile Management
https://github.com/haaag/pybrowsers
bash-script browser chrome chromium dmenu effortless firefox firefox-profile gecko profile profiles python python-script rofi waterfox
Last synced: about 1 month ago
JSON representation
A Python Script for Effortless Browser Profile Management
- Host: GitHub
- URL: https://github.com/haaag/pybrowsers
- Owner: haaag
- License: mit
- Created: 2022-07-06T04:39:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T17:34:39.000Z (4 months ago)
- Last Synced: 2024-10-15T15:11:39.480Z (about 1 month ago)
- Topics: bash-script, browser, chrome, chromium, dmenu, effortless, firefox, firefox-profile, gecko, profile, profiles, python, python-script, rofi, waterfox
- Language: Python
- Homepage:
- Size: 357 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
![linux](https://img.shields.io/badge/os-linux-blue?logo=linux)
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
![PyPI - Version](https://img.shields.io/pypi/v/pybrowsers-profiles)
[![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![code style - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/format.json)](https://github.com/astral-sh/ruff)
[![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy)
[![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/)## 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
- [dmenu](https://tools.suckless.org/dmenu/)
- [rofi](https://github.com/davatorium/rofi) _(Optional)_
- [fzf](https://github.com/junegunn/fzf) _(Optional)_### 📦 Installation
#### Using `pipx` _(recommended)_
```bash
$ pipx install pybrowsers-profiles
```> [pipx Homepage](https://github.com/pypa/pipx)
#### Using `pip` install
```bash
# Clone repository
$ git clone "https://github.com/haaag/pybrowsers"
$ 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
```bash
$ pybrowsers --helpusage: 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 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 modelocations:
$HOME/.local/share/pybrowsers
```#### Use `no flags` to launch menu
```bash
# Open menu with browsers found
$ pybrowsers
```#### Use flag `browser` for browser's profile
```bash
# 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`
```bash
# 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
```json
{
"name": "LibreWolf",
"command": "librewolf",
"path": "~/.librewolf/profiles.ini",
"engine": "gecko",
"enabled": true
}
```### 🌐 Browsers
- 🦊 [Firefox](https://www.mozilla.org/firefox/download/thanks/)
- [LibreWolf](https://librewolf.net/)
- [Chromium](https://www.chromium.org/getting-involved/download-chromium/)
- Brave
- Google Chrome### 🧰 Dependencies
- [PySelector](https://pypi.org/project/pyselector/)
### 🧰 TODO
- [ ] Create `interactive menu` for adding browser data
- [x] Update screenshots
- [x] Add `flag` for open URLs
- [x] Please, use `pathlib.Path`
- [x] BUG: Issue when the profile name contains spaces
- [x] Add support for `JSON` files _(prioritize)_