#!/usr/bin/env bash #shellcheck disable=SC2155,SC2034 #shellcheck source=/dev/null #shellcheck source=${LIBRARY}/bcclib.sh #shellcheck source=${LIBRARY}/tinilib.sh #shellcheck source=${LIBRARY}/weblib.sh # /usr/share/bigbashview/bcc/apps/biglinux-webapps/change_icon.sh # Description: WebApps installing programs for BigLinux # # Created: 2020/01/11 # Altered: 2024/08/15 # # Copyright (c) 2023-2024, Vilmar Catafesta # 2020-2023, Bruno Gonçalves # 2020-2023, Rafael Ruscher # 2020-2023, eltonff # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. APP="${0##*/}" _DATE_ALTERED_='15-08-2024 - 14:24' _VERSION_="1.0.0-20240815" _HTML_VERSION_="${_VERSION_} - ${_DATE_ALTERED_}" _UPDATED_="${_DATE_ALTERED_}" LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'} [[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh" [[ -f "${LIBRARY}/tinilib.sh" ]] && source "${LIBRARY}/tinilib.sh" [[ -f "${LIBRARY}/weblib.sh" ]] && source "${LIBRARY}/weblib.sh" function sh_index_sh_main() { # notify-send -u normal --icon=webapps --app-name "webapp-manager-biglinux" "$TITLE" "Aguarde, Processando arquivos..." --expire-time=600 # yad --title="$TITLE" --image="webapps" --text="Aguarde, Processando arquivos..." --timeout=5 --center --width=300 --height=50 --no-buttons & cat <<-EOF
$(sh_get_de)
$(sh_webapp_getbgcolor)
$Detectando_o_nome $Detectando_o_icone $Adicionando_o_webapp $Aplicando_as_alteracoes $Criando_o_backup $Importando_os_webapps $Removendo_o_webapp $Removendo_todos_os_webapps $Ativando_WebApps_Nativos $Desativando_WebApps_Nativos
EOF cat <<-EOF
$Para_adicionar_um_WebApp
$voce_precisa_informar_a_URL_e_o_Nome
$Para_detectar_o_Nome_e_o_icone
$voce_precisa_informar_a_URL
$A_URL_invalida_ou_conexao_falhou
$Tente_inserir_o_icone_pelo_botao_Alterar
$O_WebApp_foi_adicionado_com_sucesso
$Selecione_o_icone_preferido :
EOF # rotina para inclusao dos .desktop customizados pelo usuário sh_add_custom_desktop_files # source: /usr/share/bigbashview/bcc/shell/weblib.sh cat <<-EOF
$Editar_WebApp
$O_backup_dos_WebApps_foi_salvo_em :
$Os_WebApps_foram_restaurados_com_sucesso
$Voce_deseja_remover_todos_os_WebApps
EOF BROWSER=$(desktop.get "$INI_FILE_WEBAPPS" "browser" "short_name") cpath=$(desktop.get "$INI_FILE_WEBAPPS" "browser" "path") if [[ -e $cpath ]]; then ICON=$(desktop.get "$INI_FILE_WEBAPPS" "browser" "icon") title=$(desktop.get "$INI_FILE_WEBAPPS" "browser" "title") else ICON='none' title=$O_navegador_nao_esta_instalado fi if ! ((COUNT_BROWSER)); then ICON='none' title=$Nao_existem_navegadores_compativeis_instalados_no_sistema fi cat <<-EOF
$Navegador_Padrao
$dos WebApps:
EOF if ! ((COUNT_BROWSER)); then cat <<-EOF
$Nao_existem_navegadores_compativeis_instalados_no_sistema
EOF else cat <<-EOF
$Selecione_o_navegador_preferido:
EOF function sh_set_popup_browser() { local NativeOrFlatPak="$1" # Native=1, FlatPak=0 local cpath local nc=0 for cpath in "${aBrowserPath[@]}"; do if [[ -e "$cpath" ]]; then if ((NativeOrFlatPak)); then # Native [[ "$cpath" =~ '/flatpak/' ]] && continue fi cat <<-EOF EOF fi ((++nc)) done } if ((NATIVE)); then cat <<-EOF
$Nativo
EOF fi if ((FLATPAK)); then cat <<-EOF
FlatPak
EOF fi cat <<-EOF
EOF fi cat <<-EOF
$WebApps_Nativos
    ' EOF sh_add_native_desktop_files # source: /usr/share/bigbashview/bcc/shell/weblib.sh cat <<-EOF

  • $(gettext "Ambiente"):

        $(gettext "Desktop") : $XDG_CURRENT_DESKTOP
        $(gettext "Sessão") : $XDG_SESSION_TYPE
  • $(gettext "Aplicativo"):

        $(gettext "Nome") : $TEXTDOMAIN
        $(gettext "Htm versão") : $_HTML_VERSION_
        $(gettext "Lib versão") : $_WEBLIB_VERSION_
  • $(gettext "Desenvolvedores"):

        2023-2024, Vilmar Catafesta, vcatafesta@gmail.com
        2023-2023, Bruno Gonçalves, biglinux.com.br
        2023-2023, Rafael Ruscher, rruscher@gmail.com
        2020-2023, eltonff, biglinux.com.br
  • $(gettext "Colaboradores"):

        Tales, @talesam
        Narayan, @narayansilva
        Thiago, @thiago_brgs
        Marcelo, @elppans
        Lucas, @luskaedivinsky
EOF } sh_webapp_index_sh_config # source: /usr/share/bigbashview/bcc/shell/weblib.sh sh_index_sh_main