forked from colonelpanic/dotfiles
Add start_chrome_for which starts chrome profile for the provided email
This commit is contained in:
parent
6b25eb24fb
commit
dc4d385013
8
dotfiles/lib/functions/get_chrome_folder_from_address
Executable file
8
dotfiles/lib/functions/get_chrome_folder_from_address
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
function get_chrome_folder_from_address {
|
||||||
|
cat ~/.config/google-chrome/Local\ State |
|
||||||
|
jq -r ".profile.info_cache | to_entries | .[] | select(.value.user_name == \"$1\") | .key"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_chrome_folder_from_address "$@"
|
9
dotfiles/lib/functions/start_chrome_for
Executable file
9
dotfiles/lib/functions/start_chrome_for
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
function start_chrome_for {
|
||||||
|
email=$1
|
||||||
|
shift
|
||||||
|
google-chrome-stable --profile-directory="$(get_chrome_folder_from_address "$email")" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
start_chrome_for "$@"
|
Loading…
Reference in New Issue
Block a user