feat: will look in $HOME/.browsers first for instance then in default or set chromium home usually /opt/chromium. Thus a bindfs instance for the current user will take precedence.
parent
f424d8a644
commit
6e641896c6
|
@ -4,11 +4,12 @@
|
|||
# if not supplied then will use default
|
||||
chromium_() {
|
||||
local DEFAULT=/opt/chromium
|
||||
local DEFAULT_USER=$HOME/.browsers
|
||||
# local DEFAULT="$HOME/.local/share/chromium"
|
||||
local exe="/usr/bin/chromium"
|
||||
|
||||
[[ $1 == -g ]] && exe=$(command -v google-chrome) && shift
|
||||
echo exe $exe
|
||||
echo execuatble to be used: $exe
|
||||
if [[ ! -f $exe ]]; then
|
||||
echo chromium/chrome not installed, checking for flatpak version
|
||||
flatpak=$(flatpak info com.github.Eloston.UngoogledChromium | grep error:)
|
||||
|
@ -40,11 +41,10 @@ chromium_() {
|
|||
echo starting chromium for $USER in
|
||||
dir=$HOME/.config/chromium
|
||||
exe="${exe/<dir>/$dir}"
|
||||
# echo $exe "$@" $([[ $flatpak ]] && echo " @@")
|
||||
# $exe "$@"
|
||||
else
|
||||
[[ $instance == "incognito" ]] && set -- "$@" "-incognito"
|
||||
dir=${CHROMIUM_HOME:-$DEFAULT}/$instance
|
||||
dir=${DEFAULT_USER}/$instance
|
||||
dir=$([[ -d "$dir" ]] && echo $dir || echo "${CHROMIUM_HOME:-$DEFAULT}/$instance")
|
||||
exe="${exe/<dir>/$dir}"
|
||||
fi
|
||||
mkdir -p $dir
|
||||
|
|
Reference in New Issue