Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: brave browser.... #2

Open
Vaisakhkm2625 opened this issue Aug 10, 2024 · 1 comment
Open

feature request: brave browser.... #2

Vaisakhkm2625 opened this issue Aug 10, 2024 · 1 comment

Comments

@Vaisakhkm2625
Copy link

This is the script i using for switching brave profiles... (chatgpt generated... though works great...)

#!/bin/sh

# Define the Brave profile directory and Local State file
PROFILE_DIR="$HOME/.config/BraveSoftware/Brave-Browser"
LOCAL_STATE="$PROFILE_DIR/Local State"

# Extract profile names from the Local State file
profiles=$(jq -r '.profile.info_cache | to_entries[] | .value.name + " -- " + .key' "$LOCAL_STATE")

# Use rofi to select a profile
selected_entry=$(echo "$profiles" | rofi -dmenu -i -p "Select Brave Profile:")

# Extract the profile directory from the selected entry
selected_profile=$(echo "$selected_entry" | awk -F ' -- ' '{print $2}')

# If a profile was selected, launch Brave with that profile
if [ -n "$selected_profile" ]; then
	brave --profile-directory="$selected_profile" &
fi
@obvionaoe
Copy link
Owner

I will try and implement this as soon as I have the time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants