/profiles-dmenu-browser

Simple Script for launching Brave's or Chromium's Profiles

Primary LanguageShell

Simple Script for launching browser's Profiles

It takes care of reading the 'Preferences' file in each profile directory in $XDG_CONFIG_HOME/BraveSoftware/Brave-Browser/ or $XDG_CONFIG_HOME/chromium/, gets the name of the profile, pipes to dmenu and opens browser with the selected profile.

The profile name must be unique.

Dependencies

Estructura

$XDG_CONFIG_HOME/browser/
├── Profile 1
│   └── Preferences
├── Profile 2
│   └── Preferences
└── Profile 3
    └── Preferences

Preferences Estructura

The Preferences file is a very long json file. I used jq so I could get the value of the profile.name key, which represents the name I gave the profile.

"profile": {
    "avatar_bubble_tutorial_shown": 2,
    "avatar_index": 26,
    "content_settings": {
        "enable_quiet_permission_ui_enabling_method": {
            "notifications": 1
        },
        "exceptions": {
            "bluetooth_guard": {}
        },
        "pref_version": 1
    }
    "default_content_setting_values": {
        "cookies": 1
    }
=======> "name": "profile-name-im-looking-for",
}

TODO

  • Create profiles
    • browser --user-data-dir=test2 --no-first-run --no-default-browser-check
  • Delete profiles
  • Maybe rename profiles