From 6e641896c6230b20bb513182e66274f2d447a3dd Mon Sep 17 00:00:00 2001 From: "kebler.net" Date: Sat, 4 Dec 2021 22:14:09 -0800 Subject: [PATCH] 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. --- all/modules/chromium/chromium.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/all/modules/chromium/chromium.sh b/all/modules/chromium/chromium.sh index 3421f18..2878e3c 100755 --- a/all/modules/chromium/chromium.sh +++ b/all/modules/chromium/chromium.sh @@ -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}" - # 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}" fi mkdir -p $dir