diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index ba122a4..c04cc8c 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -15,6 +15,10 @@ super + d ctrl + b; d tmenu_run +# launch brave with profile selection +super + b + brave-launcher + # kill sxhkd with USR1 and restart bspwm super + r pkill -USR1 -x sxhkd; \ @@ -94,7 +98,7 @@ shift + Insert special_ins # phone specific -- send the escape key since we can't use it -super + b; [ +ctrl + b; [ xdotool key Escape # mouse keybindings on the keypad diff --git a/builds/utils/brave-launcher b/builds/utils/brave-launcher new file mode 100755 index 0000000..f1793cf --- /dev/null +++ b/builds/utils/brave-launcher @@ -0,0 +1,15 @@ +#!/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