feat: add second url to open argument to script
parent
21c9940d4d
commit
ade5236b01
|
@ -9,6 +9,7 @@ local exe="/usr/bin/chromium"
|
||||||
[[ ! $exe ]] && echo chromium not installed set && return 1
|
[[ ! $exe ]] && echo chromium not installed set && return 1
|
||||||
user=${CHROMIUM_USER}
|
user=${CHROMIUM_USER}
|
||||||
[[ $1 && ( ! $1 == -* ) ]] && user=$1 && shift
|
[[ $1 && ( ! $1 == -* ) ]] && user=$1 && shift
|
||||||
|
[[ $1 && ( ! $1 == -* ) ]] && url=$1 && shift
|
||||||
user=${user:-$USER}
|
user=${user:-$USER}
|
||||||
if [[ $user == "$USER" ]]; then
|
if [[ $user == "$USER" ]]; then
|
||||||
unset CHROME_CONFIG_HOME
|
unset CHROME_CONFIG_HOME
|
||||||
|
@ -19,7 +20,7 @@ if [[ $user == "$USER" ]]; then
|
||||||
[[ $user == "incognito" ]] && set -- "$@" "-incognito"
|
[[ $user == "incognito" ]] && set -- "$@" "-incognito"
|
||||||
dir=${CHROMIUM_HOME:-$DEFAULT}
|
dir=${CHROMIUM_HOME:-$DEFAULT}
|
||||||
echo "$exe $@ --user-data-dir=$dir/$user"
|
echo "$exe $@ --user-data-dir=$dir/$user"
|
||||||
"$exe" "$@" --user-data-dir="$dir"/"$user"
|
"$exe" "$@" --user-data-dir="$dir"/"$user" $url
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue