Merge remote-tracking branch 'git.kebler.net/master' into giskard
commit
d84b6090b9
|
@ -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
|
||||||
|
|
Reference in New Issue