Add support for firefox installed with flatpak

This commit is contained in:
Codename 2021-05-23 17:56:33 +02:00
parent ba3718531d
commit 733cb52491
2 changed files with 9 additions and 1 deletions

View file

@ -46,6 +46,8 @@ DASH_TO_DOCK_DIR_HOME="/home/${MY_USERNAME}/.local/share/gnome-shell/extensions/
FIREFOX_SRC_DIR="${REPO_DIR}/src/other/firefox" FIREFOX_SRC_DIR="${REPO_DIR}/src/other/firefox"
FIREFOX_DIR_HOME="/home/${MY_USERNAME}/.mozilla/firefox" FIREFOX_DIR_HOME="/home/${MY_USERNAME}/.mozilla/firefox"
FIREFOX_THEME_DIR="/home/${MY_USERNAME}/.mozilla/firefox/firefox-themes" FIREFOX_THEME_DIR="/home/${MY_USERNAME}/.mozilla/firefox/firefox-themes"
FIREFOX_FLATPAK_DIR_HOME="/home/${MY_USERNAME}/.var/app/org.mozilla.firefox/.mozilla/firefox"
FIREFOX_FLATPAK_THEME_DIR="/home/${MY_USERNAME}/.var/app/org.mozilla.firefox/.mozilla/firefox/firefox-themes"
export WHITESUR_TMP_DIR="/tmp/WhiteSur.lock" export WHITESUR_TMP_DIR="/tmp/WhiteSur.lock"
if [[ -w "/" ]]; then if [[ -w "/" ]]; then

View file

@ -67,7 +67,13 @@ while [[ $# -gt 0 ]]; do
edit_firefox="true" ;; edit_firefox="true" ;;
esac esac
if ! has_command firefox; then if [[ -d "${FIREFOX_FLATPAK_DIR_HOME}" ]]; then
FIREFOX_DIR_HOME=${FIREFOX_FLATPAK_DIR_HOME}
mkdir -p ${FIREFOX_FLATPAK_THEME_DIR}
FIREFOX_THEME_DIR=${FIREFOX_FLATPAK_THEME_DIR}
fi;
if [[ ! -d "${FIREFOX_FLATPAK_DIR_HOME}" ]] && ! has_command firefox; then
prompt -e "'${1}' ERROR: There's no Firefox installed in your system" prompt -e "'${1}' ERROR: There's no Firefox installed in your system"
has_any_error="true" has_any_error="true"
elif [[ ! -d "${FIREFOX_DIR_HOME}" ]]; then elif [[ ! -d "${FIREFOX_DIR_HOME}" ]]; then