Simple script that launches browser with the selected profile.
Project description
Profile Launcher: A Python Script for Effortless Browser Profile Management
⭐ About
This Python script allows you to quickly launch browser profiles
without having to manually navigate through the browser's settings.
It reads the profile information from each browser's config directory and presents them as options for launch.
This can save you time and improve your workflow if you frequently switch between multiple profiles.
The script currently supports all Chromium and Gecko-based browsers that use XDG config
and ~/.mozilla
directories.
📦 Installation
> Using pipx
(recommended)
$ pipx install pybrowsers-profiles
> Using pip
install
# Just clone repository
$ git clone "https://github.com/haaag/PyBrowsers-Profiles"
$ cd PyBrowsers-Profiles
# Create virtual environment & source
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install .
🚀 Usage
$ pybrowsers --help
[-h] [-b BROWSER] [-v] [-r] [-f] [-t]
usage: Simple script that launches browser with the selected profile.
options:
-h, --help show this help message and exit
-b, --browser Browser to launch (default: firefox)
-r, --rofi Use Rofi (default: dmenu)
-f, --found Select from browsers found in your system.
-v, --verbose
> Use the -b
or --browser
option to specify the browser you want to launch
# Open menu with profiles list on Dmenu (This script defaults to Dmenu as Menu)
$ (.venv) pybrowsers -b firefox
# or
$ (.venv) pybrowsers --browser firefox
> Use the -r
or --rofi
option to specify the launcher you want to use
$ (.venv) pybrowsers -b firefox --rofi
> Open all browsers found with Dmenu or Rofi with the argument --found
# Dmenu
$ (.venv) pybrowsers --found
# Rofi
$ (.venv) pybrowsers --found --rofi
➕ Add Browser
You can add a new configuration by modifying the src/database.py
file accordingly.
Example
"ungoogled-chromium": {
"name": "ungoogled-chromium",
"command": "ungoogled-chromium",
"profile_command": "--profile-directory='{profile}' --no-default-browser-check",
"profile_file": "~/.config/chromium/Local State",
"incognito": "--incognito",
"type": JSON,
}
🌐 Browsers
- Firefox
- LibreWolf
- Ungoogled Chromium
- Chromium
- Brave
- Google Chrome
- Waterfox Classic
⚡️ Requirements
🧰 TODO
- Better way to
add a new browser
- Go back to
JSON
file? - Use
sqlite3
?
- Go back to
- Find a better way to get
Menu
object (maybe factory mode) - Please, use
pathlib.Path
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
Built Distribution
Close
Hashes for pybrowsers_profiles-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfe9c588089d9b465f21003cf8c9de1d9c5998aaec45348444da4780b8d657aa |
|
MD5 | b88b583e494bb9f54dacb5b23607016a |
|
BLAKE2b-256 | a28f1355a31449f437b6ab319a7cc936e3e8f64bae111972e4a29ef76ef83a25 |
Close
Hashes for pybrowsers_profiles-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d17827b7e2b700cf3ccf3dc76e145c5164b39a967ab2c06327fb997e4f20cd12 |
|
MD5 | 88ff82864f9f2fb4916618a542664000 |
|
BLAKE2b-256 | 950255547adc51c6990c0f863be16b0added29e5b60607110b1677403cbc1249 |