From 2e0246541d252ad9dbc65c4614e1fd67afc0ccac Mon Sep 17 00:00:00 2001 From: BrainwreckedTech <--get> Date: Tue, 19 Jan 2021 03:30:34 -0500 Subject: [PATCH] Switch ssb/pwa to prefix profile and class name instead of suffix them. --- mkwebapp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mkwebapp b/mkwebapp index f4c3079..3f2eede 100755 --- a/mkwebapp +++ b/mkwebapp @@ -140,16 +140,16 @@ fi if [ "${WA_BRWSR}" = "firefox" ]; then ### CREATE DIRECTORY FOR FIREFOX CACHE - printf -- ':: ' && mkdir -pv "/run/user/${UID}/${WAPPNAME,,}-ssb" + printf -- ':: ' && mkdir -pv "/run/user/${UID}/ssb-${WAPPNAME,,}" ### CREATE A NEW PROFILE FOR THIS WEB APP - echo /usr/bin/firefox -CreateProfile "${WAPPNAME,,}-ssb" -no-remote + echo /usr/bin/firefox -CreateProfile "ssb-${WAPPNAME,,}" -no-remote ### FIND THE DIRECTORY FIREFOX CREATED - FFPFDIR="$(find "${HOME}/.mozilla/firefox" -type d -name '*'."${WAPPNAME,,}-ssb")" + FFPFDIR="$(find "${HOME}/.mozilla/firefox" -type d -name '*'."ssb-${WAPPNAME,,}")" ### INJECT PREFERENCES - USRPREF1='user_pref("browser.cache.disk.parent_directory", "/run/user/'"${UID}"'/'"${WAPPNAME,,}"'-ssb");' + USRPREF1='user_pref("browser.cache.disk.parent_directory", "/run/user/'"${UID}"'/ssb-'"${WAPPNAME,,}"');' USRPREF2='user_pref("browser.ssb.enabled", true);' USRPREF3='user_pref("extensions.pocket.enabled", false);' USRPREF4='user_pref("privacy.donottrackheader.enabled", true);' @@ -172,15 +172,15 @@ curl -s "${WAPPICON}" -o "${WAPP_ICO}" -w ':: curl: wrote "%{url_effective}" to ### CREATE COMMAND LINE FOR THE .desktop FILE case "${WASUFFIX}" in 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}'";; - ssb) WAPP_CMD="${BRWSRBIN} -P ${WAPPNAME,,}-ssb --class ${WAPPNAME,,}-ssb --no-remote --ssb ${WAPPADDR}";; + pwa) WAPP_CMD="${BRWSRBIN} --user-data-dir='${CONF_DIR}/${WA_BRWSR}/pwa-${WAPPNAME,,}' --class pwa-${WAPPNAME,,} --no-first-run --no-default-browser-check --app='${WAPPADDR}'";; + ssb) WAPP_CMD="${BRWSRBIN} -P ssb-${WAPPNAME,,} --class ssb-${WAPPNAME,,} --no-remote --ssb ${WAPPADDR}";; esac ### CREATE WMCLASS FOR THE .desktop FILE case "${WASUFFIX}" in ewa) WAWMCLAS="${EWA_PRFX}${WAPPNAME,,}";; - pwa) WAWMCLAS="${WAPPNAME,,}-pwa";; - ssb) WAWMCLAS="${WAPPNAME,,}-ssb";; + pwa) WAWMCLAS="pwa-${WAPPNAME,,}";; + ssb) WAWMCLAS="ssb-${WAPPNAME,,}";; esac ### CREATE A DESKTOP ENTRY FOR THE WEB APP @@ -209,7 +209,7 @@ fi WAPP_DTF="${WAPP_DTF/.desktop/.proxied.desktop}" [ "${WASUFFIX}" = "pwa" ] && PRX_MTHD="Local Proxy" && WAPP_CMD="${WAPP_CMD} --proxy-server=socks://127.0.0.1:8080" [ ! "${WASUFFIX}" = "pwa" ] && PRX_MTHD="Proxychains" && WAPP_CMD="proxychains ${WAPP_CMD}" -[ "${WASUFFIX}" = "ssb" ] && WAPP_CMD="${WAPP_CMD/--class ${WAPPNAME,,}-ssb/--class ${WAPPNAME,,}.proxy-ssb} " +[ ! "${WASUFFIX}" = "ewa" ] && WAPP_CMD="${WAPP_CMD/--class ${WASUFFIX}-${WAPPNAME,,}/--class ${WASUFFIX}-${WAPPNAME,,}.proxy}" WAWMCLAS="${WAWMCLAS/${WAPPNAME,,}/${WAPPNAME,,}.proxy}" DTE0="[Desktop Entry]"