diff --git a/lib-install.sh b/lib-install.sh index 13f20b5..06825c2 100755 --- a/lib-install.sh +++ b/lib-install.sh @@ -434,6 +434,7 @@ revert_gdm_theme() { install_firefox_theme() { remove_firefox_theme + userify mkdir -p "${FIREFOX_THEME_DIR}" userify cp -rf "${FIREFOX_SRC_DIR}" "${FIREFOX_THEME_DIR}" config_firefox } diff --git a/tweaks.sh b/tweaks.sh index cc70701..58b9568 100755 --- a/tweaks.sh +++ b/tweaks.sh @@ -67,20 +67,14 @@ while [[ $# -gt 0 ]]; do edit_firefox="true" ;; esac - 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 + if ! has_command firefox && [[ ! "$(flatpak list --columns=application 2> /dev/null | grep org.mozilla.firefox)" ]]; then prompt -e "'${1}' ERROR: There's no Firefox installed in your system" has_any_error="true" - elif [[ ! -d "${FIREFOX_DIR_HOME}" ]]; then + elif [[ ! -d "${FIREFOX_DIR_HOME}" ]] && (has_command flatpak && [[ ! -d "${FIREFOX_FLATPAK_DIR_HOME}" ]]); then prompt -e "'${1}' ERROR: Firefox is installed but not yet initialized." prompt -w "'${1}': Don't forget to close it after you run/initialize it" has_any_error="true" - elif pidof "firefox" &> /dev/null; then + elif pidof "firefox" &> /dev/null || pidof "firefox-bin" &> /dev/null; then prompt -e "'${1}' ERROR: Firefox is running, please close it" has_any_error="true" fi; shift ;;