dot_testing/builds/utils/brave-launcher

16 lines
465 B
Plaintext
Raw Normal View History

2024-11-18 19:01:28 -06:00
#!/bin/sh
profiles=$(ls ~/.config/BraveSoftware/Brave-Browser/ | grep Profile)
choices=""
IFS="
"
for profile in $profiles; do
name_of_profile=$(cat ~/.config/BraveSoftware/Brave-Browser/$profile/Preferences | jq .profile.name -r)
choices=$(printf "%s:%s|%s" "$name_of_profile" "$profile" "$choices")
done
choice=$(echo $choices | sed 's/|/\n/g' | tmenu)
profile_name=$(echo $choice | awk -F':' '{print $2}')
brave --profile-directory="$profile_name" & disown