Improved logic.

master
BrainwreckedTech 4 years ago
parent 9de7ca543f
commit bd91599ebd

@ -17,7 +17,6 @@
set -x set -x
CONF_DIR="${HOME}/.config" CONF_DIR="${HOME}/.config"
WAPP_PRE="org.gnome.Epiphany.WebApp-"
LOCALDIR="${HOME}/.local" LOCALDIR="${HOME}/.local"
SHAREDIR="${LOCALDIR}/share" SHAREDIR="${LOCALDIR}/share"
@ -113,7 +112,6 @@ fi
### SET SUFFIX AND BIN BASED ON BROWSER ### SET SUFFIX AND BIN BASED ON BROWSER
case "${WA_BRWSR}" in case "${WA_BRWSR}" in
"chrome") WASUFFIX="pwa" ; BRWSRBIN="google-chrome" ; break;;
"chromium") WASUFFIX="pwa" ; BRWSRBIN="chromium" ; break;; "chromium") WASUFFIX="pwa" ; BRWSRBIN="chromium" ; break;;
"firefox") WASUFFIX="ssb" ; BRWSRBIN="firefox" ; break;; "firefox") WASUFFIX="ssb" ; BRWSRBIN="firefox" ; break;;
"google-chrome") WASUFFIX="pwa" ; BRWSRBIN="google-chrome" ; break;; "google-chrome") WASUFFIX="pwa" ; BRWSRBIN="google-chrome" ; break;;
@ -122,22 +120,24 @@ case "${WA_BRWSR}" in
esac esac
### PLACES FOR STUFF ### PLACES FOR STUFF
WAPP_DIR="${APPS_DIR}/${WASUFFIX}"
WAPP_ICO="${ICONSDIR}/${WASUFFIX}/${WAPPNAME,,}.${WAPPICON##*.}"
WAPP_DTF="${APPS_DIR}/${WASUFFIX}/${WAPPNAME,,}.desktop"
### EPIPHANY WEB APPS ARE SNOWFLAKE
if [ "${WA_BRWSR}" = "epiphany" ]; then if [ "${WA_BRWSR}" = "epiphany" ]; then
WAPP_PRE="org.gnome.Epiphany.WebApp-"
WAPP_DIR="${SHAREDIR}/${WAPP_PRE}${WAPPNAME,,}" WAPP_DIR="${SHAREDIR}/${WAPP_PRE}${WAPPNAME,,}"
WAPP_ICO="${WAPP_DIR}/app-icon.${WAPPICON##*.}" WAPP_ICO="${WAPP_DIR}/app-icon.${WAPPICON##*.}"
WAPP_DTF="${WAPP_DIR}/${WAPP_PRE}${WAPPNAME,,}.desktop" WAPP_DTF="${WAPP_DIR}/${WAPP_PRE}${WAPPNAME,,}.desktop"
else else
WAPP_PRE= WAPP_DIR="${APPS_DIR}/${WASUFFIX}"
WAPP_ICO="${ICONSDIR}/${WASUFFIX}/${WAPPNAME,,}.${WAPPICON##*.}"
WAPP_DTF="${APPS_DIR}/${WASUFFIX}/${WAPPNAME,,}.desktop"
fi fi
### FIREFOX IS ALSO SNOWFLAKE ### PROFILE SETTINGS
if [ "${WA_BRWSR}" = "firefox" ]; then if [ "${WASUFFIX}" = "pwa" ]; then
WAPP_DPF="${CONF_DIR}/${WA_BRWSR}/${WASUFFIX}-default"
WAPP_PRF="${CONF_DIR}/${WA_BRWSR}/${WASUFFIX}-${WAPPNAME,,}"
elif [ "${WASUFFIX}" = "ssb" ]; then
### CREATE DIRECTORY FOR FIREFOX CACHE ### CREATE DIRECTORY FOR FIREFOX CACHE
printf -- ':: ' && mkdir -pv "/run/user/${UID}/ssb-${WAPPNAME,,}" printf -- ':: ' && mkdir -pv "/run/user/${UID}/ssb-${WAPPNAME,,}"

Loading…
Cancel
Save