Changed vairable name from WDSUFFIX to WASUFFIX.

master
BrainwreckedTech 4 years ago
parent b6075a2016
commit fc3af95864

@ -113,18 +113,18 @@ fi
### SET SUFFIX AND BIN BASED ON BROWSER ### SET SUFFIX AND BIN BASED ON BROWSER
case "${WA_BRWSR}" in case "${WA_BRWSR}" in
"chrome") WDSUFFIX="pwa" ; BRWSRBIN="google-chrome" ; break;; "chrome") WASUFFIX="pwa" ; BRWSRBIN="google-chrome" ; break;;
"chromium") WDSUFFIX="pwa" ; BRWSRBIN="chromium" ; break;; "chromium") WASUFFIX="pwa" ; BRWSRBIN="chromium" ; break;;
"firefox") WDSUFFIX="ssb" ; BRWSRBIN="firefox" ; break;; "firefox") WASUFFIX="ssb" ; BRWSRBIN="firefox" ; break;;
"google-chrome") WDSUFFIX="pwa" ; BRWSRBIN="google-chrome" ; break;; "google-chrome") WASUFFIX="pwa" ; BRWSRBIN="google-chrome" ; break;;
"epiphany") WDSUFFIX="ewa" ; BRWSRBIN="epiphany" ; break;; "epiphany") WASUFFIX="ewa" ; BRWSRBIN="epiphany" ; break;;
"iridium") WDSUFFIX="pwa" ; BRWSRBIN="iridium-browser" ; break;; "iridium") WASUFFIX="pwa" ; BRWSRBIN="iridium-browser" ; break;;
esac esac
### PLACES FOR STUFF ### PLACES FOR STUFF
WAPP_DIR="${APPS_DIR}/${WDSUFFIX}" WAPP_DIR="${APPS_DIR}/${WASUFFIX}"
WAPP_ICO="${ICONSDIR}/${WDSUFFIX}/${WAPPNAME,,}.${WAPPICON##*.}" WAPP_ICO="${ICONSDIR}/${WASUFFIX}/${WAPPNAME,,}.${WAPPICON##*.}"
WAPP_DTF="${APPS_DIR}/${WDSUFFIX}/${WAPPNAME,,}.desktop" WAPP_DTF="${APPS_DIR}/${WASUFFIX}/${WAPPNAME,,}.desktop"
### EPIPHANY WEB APPS ARE SNOWFLAKE ### EPIPHANY WEB APPS ARE SNOWFLAKE
@ -170,14 +170,14 @@ printf -- ':: ' && mkdir -pv "${WAPP_DIR}"
curl -s "${WAPPICON}" -o "${WAPP_ICO}" -w ':: curl: wrote "%{url_effective}" to "%{filename_effective}"\n' curl -s "${WAPPICON}" -o "${WAPP_ICO}" -w ':: curl: wrote "%{url_effective}" to "%{filename_effective}"\n'
### CREATE COMMAND LINE FOR THE .desktop FILE ### CREATE COMMAND LINE FOR THE .desktop FILE
case "${WDSUFFIX}" in case "${WASUFFIX}" in
ewa) WAPP_CMD="${BRWSRBIN} --application-mode --profile='${WAPP_DIR}' ${WAPPADDR}";; ewa) WAPP_CMD="${BRWSRBIN} --application-mode --profile='${WAPP_DIR}' ${WAPPADDR}";;
pwa) WAPP_CMD="${BRWSRBIN} --user-data-dir='${CONF_DIR}/${WA_BRWSR}/${WAPPNAME,,}-pwa' --no-first-run --no-default-browser-check --app='${WAPPADDR}'";; pwa) WAPP_CMD="${BRWSRBIN} --user-data-dir='${CONF_DIR}/${WA_BRWSR}/${WAPPNAME,,}-pwa' --no-first-run --no-default-browser-check --app='${WAPPADDR}'";;
ssb) WAPP_CMD="${BRWSRBIN} -P ${WAPPNAME,,}-ssb --class ${WAPPNAME,,}-ssb --no-remote --ssb ${WAPPADDR}";; ssb) WAPP_CMD="${BRWSRBIN} -P ${WAPPNAME,,}-ssb --class ${WAPPNAME,,}-ssb --no-remote --ssb ${WAPPADDR}";;
esac esac
### CREATE WMCLASS FOR THE .desktop FILE ### CREATE WMCLASS FOR THE .desktop FILE
case "${WDSUFFIX}" in case "${WASUFFIX}" in
ewa) WAWMCLAS="${EWA_PRFX}${WAPPNAME,,}";; ewa) WAWMCLAS="${EWA_PRFX}${WAPPNAME,,}";;
pwa) WAWMCLAS="${WAPPNAME,,}-pwa";; pwa) WAWMCLAS="${WAPPNAME,,}-pwa";;
ssb) WAWMCLAS="${WAPPNAME,,}-ssb";; ssb) WAWMCLAS="${WAPPNAME,,}-ssb";;
@ -185,7 +185,7 @@ esac
### CREATE A DESKTOP ENTRY FOR THE WEB APP ### CREATE A DESKTOP ENTRY FOR THE WEB APP
DTE0="[Desktop Entry]" DTE0="[Desktop Entry]"
DTE1="Name=${WAPPNAME} (${WDSUFFIX^^})" DTE1="Name=${WAPPNAME} (${WASUFFIX^^})"
DTE2="GenericName=${WAPPDESC}" DTE2="GenericName=${WAPPDESC}"
DTE3="Exec=${WAPP_CMD}" DTE3="Exec=${WAPP_CMD}"
DTE4="StartupNotify=true" DTE4="StartupNotify=true"
@ -207,13 +207,13 @@ fi
### CREATE A PROXIED VERSION ### CREATE A PROXIED VERSION
WAPP_DTF="${WAPP_DTF/.desktop/.proxied.desktop}" WAPP_DTF="${WAPP_DTF/.desktop/.proxied.desktop}"
[ "${WDSUFFIX}" = "pwa" ] && PRX_MTHD="Local Proxy" && WAPP_CMD="${WAPP_CMD} --proxy-server=socks://127.0.0.1:8080" [ "${WASUFFIX}" = "pwa" ] && PRX_MTHD="Local Proxy" && WAPP_CMD="${WAPP_CMD} --proxy-server=socks://127.0.0.1:8080"
[ ! "${WDSUFFIX}" = "pwa" ] && PRX_MTHD="Proxychains" && WAPP_CMD="proxychains ${WAPP_CMD}" [ ! "${WASUFFIX}" = "pwa" ] && PRX_MTHD="Proxychains" && WAPP_CMD="proxychains ${WAPP_CMD}"
[ "${WDSUFFIX}" = "ssb" ] && WAPP_CMD="${WAPP_CMD/--class ${WAPPNAME,,}-ssb/--class ${WAPPNAME,,}.proxy-ssb} " [ "${WASUFFIX}" = "ssb" ] && WAPP_CMD="${WAPP_CMD/--class ${WAPPNAME,,}-ssb/--class ${WAPPNAME,,}.proxy-ssb} "
WAWMCLAS="${WAWMCLAS/${WAPPNAME,,}/${WAPPNAME,,}.proxy}" WAWMCLAS="${WAWMCLAS/${WAPPNAME,,}/${WAPPNAME,,}.proxy}"
DTE0="[Desktop Entry]" DTE0="[Desktop Entry]"
DTE1="Name=${WAPPNAME} (${WDSUFFIX^^}) via ${PRX_MTHD}" DTE1="Name=${WAPPNAME} (${WASUFFIX^^}) via ${PRX_MTHD}"
DTE2="GenericName=${WAPPDESC}" DTE2="GenericName=${WAPPDESC}"
DTE3="Exec=${WAPP_CMD}" DTE3="Exec=${WAPP_CMD}"
DTE4="StartupNotify=true" DTE4="StartupNotify=true"

Loading…
Cancel
Save