#!/usr/bin/env sh # ©2021 Brainwrecked Tech # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # For a copy of this license, see . ./makessb.sh "${@}" APPS_DIR="${HOME}/.local/share/applications/ssb" WAPPDIRF="${HOME}/.local/share/desktop-directories/web-applications.directory" WAPPMENF="${HOME}/.config/menus/applications-merged/web-applications.menu" WAPPNAME="${1}" WAPPDESC="${2}" WAPPADDR="${3}" WAPPICON="${4}" ICON_LOC="${APPS_DIR}/${WAPPNAME,,}.${WAPPICON##*.}" DSKTPFIL="${APPS_DIR}/${WAPPNAME,,}.proxy.desktop" ### CREATE A PROXIED VERSION echo "[Desktop Entry] Name=${WAPPNAME} (SSB) via ProxyChains GenericName=${WAPPDESC} Exec=proxychains firefox -P ${WAPPNAME,,}-ssb --class ${WAPPNAME,,}-ssb-proxy --no-remote -ssb ${WAPPADDR} StartupNotify=true Terminal=false Type=Application Categories=WebApplications Icon=${ICON_LOC} StartupWMClass=${WAPPNAME,,}-ssb-proxy" > "${DSKTPFIL}" && printf -- ':: echo: created %s\n' "${DSKTPFIL}"