Merge remote-tracking branch 'git.kebler.net/master' into giskard

giskard
Kebler Network System Administrator 2021-12-06 08:25:00 -08:00
commit d84b6090b9
1 changed files with 4 additions and 4 deletions

View File

@ -4,11 +4,12 @@
# if not supplied then will use default # if not supplied then will use default
chromium_() { chromium_() {
local DEFAULT=/opt/chromium local DEFAULT=/opt/chromium
local DEFAULT_USER=$HOME/.browsers
# local DEFAULT="$HOME/.local/share/chromium" # local DEFAULT="$HOME/.local/share/chromium"
local exe="/usr/bin/chromium" local exe="/usr/bin/chromium"
[[ $1 == -g ]] && exe=$(command -v google-chrome) && shift [[ $1 == -g ]] && exe=$(command -v google-chrome) && shift
echo exe $exe echo execuatble to be used: $exe
if [[ ! -f $exe ]]; then if [[ ! -f $exe ]]; then
echo chromium/chrome not installed, checking for flatpak version echo chromium/chrome not installed, checking for flatpak version
flatpak=$(flatpak info com.github.Eloston.UngoogledChromium | grep error:) flatpak=$(flatpak info com.github.Eloston.UngoogledChromium | grep error:)
@ -40,11 +41,10 @@ chromium_() {
echo starting chromium for $USER in echo starting chromium for $USER in
dir=$HOME/.config/chromium dir=$HOME/.config/chromium
exe="${exe/<dir>/$dir}" exe="${exe/<dir>/$dir}"
# echo $exe "$@" $([[ $flatpak ]] && echo " @@")
# $exe "$@"
else else
[[ $instance == "incognito" ]] && set -- "$@" "-incognito" [[ $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}" exe="${exe/<dir>/$dir}"
fi fi
mkdir -p $dir mkdir -p $dir