From 733cb52491053c34d70d3a557ffc763376963dd0 Mon Sep 17 00:00:00 2001 From: Codename Date: Sun, 23 May 2021 17:56:33 +0200 Subject: [PATCH] Add support for firefox installed with flatpak --- lib-core.sh | 2 ++ tweaks.sh | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib-core.sh b/lib-core.sh index 96d244c..fc1e191 100755 --- a/lib-core.sh +++ b/lib-core.sh @@ -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_DIR_HOME="/home/${MY_USERNAME}/.mozilla/firefox" 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" if [[ -w "/" ]]; then diff --git a/tweaks.sh b/tweaks.sh index 4ccc89a..43e17ff 100755 --- a/tweaks.sh +++ b/tweaks.sh @@ -67,7 +67,13 @@ while [[ $# -gt 0 ]]; do edit_firefox="true" ;; 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" has_any_error="true" elif [[ ! -d "${FIREFOX_DIR_HOME}" ]]; then