-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from vcatafesta/main
qua 03 jul 2024 01:18:15 -04 Vilmar Catafesta ([email protected])
- Loading branch information
Showing
9 changed files
with
1,344 additions
and
1,191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,9 @@ | |
# Description: Big Store installing programs for BigLinux | ||
# | ||
# Created: 2020/01/11 | ||
# Altered: 2024/01/10 | ||
# Altered: 2024/07/10 | ||
# | ||
# Copyright (c) 2023-2023, Vilmar Catafesta <[email protected]> | ||
# Copyright (c) 2023-2024, Vilmar Catafesta <[email protected]> | ||
# 2022-2023, Bruno Gonçalves <www.biglinux.com.br> | ||
# 2022-2023, Rafael Ruscher <[email protected]> | ||
# All rights reserved. | ||
|
@@ -34,31 +34,27 @@ | |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
APP="${0##*/}" | ||
_VERSION_="1.0.0-20240110" | ||
export BOOTLOG="/tmp/bigstore-$USER-$(date +"%d%m%Y").log" | ||
export LOGGER='/dev/tty8' | ||
export HOME_FOLDER="$HOME/.bigstore" | ||
export TMP_FOLDER="/tmp/bigstore-$USER" | ||
export INI_FILE_BIG_STORE="$HOME_FOLDER/big-store.ini" | ||
_VERSION_="1.0.0-20240710" | ||
# | ||
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'} | ||
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh" | ||
[[ -f "${LIBRARY}/bstrlib.sh" ]] && source "${LIBRARY}/bstrlib.sh" | ||
[[ -f "${LIBRARY}/tinilib.sh" ]] && source "${LIBRARY}/tinilib.sh" | ||
|
||
function sh_config() { | ||
#desabilitando variáveis proxy do dde, as mesmas não permitem atualizações do pamac | ||
unset auto_proxy ftp_proxy http_proxy https_proxy no_proxy all_proxy | ||
#desabilitando variáveis proxy do dde, as mesmas não permitem atualizações do pamac | ||
unset auto_proxy ftp_proxy http_proxy https_proxy no_proxy all_proxy | ||
#Translation | ||
export TEXTDOMAINDIR="/usr/share/locale" | ||
export TEXTDOMAIN=big-store | ||
declare -g bigstorepath='/usr/share/bigbashview/bcc/apps/big-store' | ||
declare -g snap_cache_file="$HOME_FOLDER/snap.cache" | ||
declare -g flatpak_cache_file="$HOME_FOLDER/flatpak.cache" | ||
declare -g bigstore_icon_file='icons/icon.svg' | ||
declare -g bigstore_icon_file='icons/big-store.svg' | ||
declare -g TITLE="Big-Store" | ||
declare -gA Amsg=( | ||
[error_open]=$(gettext $"Outra instância do Big-Store já está em execução.") | ||
[error_access_dir]=$(gettext $"Erro ao acessar o diretório:") | ||
[error_open]=$(gettext $"Outra instância do Big-Store já está em execução.") | ||
[error_access_dir]=$(gettext $"Erro ao acessar o diretório:") | ||
) | ||
} | ||
|
||
|
@@ -80,6 +76,7 @@ function sh_check_big_store_is_running() { | |
} | ||
|
||
function sh_big_store_start_sh_main { | ||
local default_size='960x720' | ||
local height | ||
local widht | ||
local half_height | ||
|
@@ -94,8 +91,8 @@ function sh_big_store_start_sh_main { | |
} | ||
|
||
# reformat pretry .ini | ||
[[ -e "$INI_FILE_BIG_STORE" ]] && big-tini-pretty -q "$INI_FILE_BIG_STORE" | ||
# [[ -e "$INI_FILE_BIG_STORE" ]] && TIni.AlignIniFile "$INI_FILE_BIG_STORE" | ||
# [[ -e "$INI_FILE_BIG_STORE" ]] && big-tini-pretty -q "$INI_FILE_BIG_STORE" | ||
[[ -e "$INI_FILE_BIG_STORE" ]] && TIni.Sanitize "$INI_FILE_BIG_STORE" | ||
|
||
if TIni.Exist "$INI_FILE_BIG_STORE" "snap" "snap_active" '1' && [[ -e "/usr/lib/libpamac-snap.so" ]]; then | ||
[[ ! -e "$snap_cache_file" ]] || [[ "$(find "$snap_cache_file" -mtime +1 -print)" ]] && sh_update_cache_snap "$processamento_em_paralelo" & | ||
|
@@ -105,15 +102,32 @@ function sh_big_store_start_sh_main { | |
[[ ! -e "$flatpak_cache_file" ]] || [[ "$(find "$flatpak_cache_file" -mtime +1 -print)" ]] && sh_update_cache_flatpak "$processamento_em_paralelo" & | ||
fi | ||
|
||
width=$(xrandr | grep -oP 'primary \K[0-9]+(?=x)') | ||
height=$(xrandr | grep -oP 'primary \K[0-9]+x\K[0-9]+') | ||
half_width=$((width / 2)) | ||
half_height=$((height / 2)) | ||
# Obtém a largura da tela primária usando xrandr | ||
if width=$(xrandr | grep -oP 'primary \K[0-9]+(?=x)') && [[ -n "$width" ]]; then | ||
# Se a largura foi obtida, tenta obter a altura da tela primária | ||
if height=$(xrandr | grep -oP 'primary \K[0-9]+x\K[0-9]+') && [[ -n "$height" ]]; then | ||
# Calcula metade da largura e altura | ||
half_width=$((width / 2)) | ||
half_height=$((height / 2 * 3 / 2)) | ||
# Atualiza o tamanho padrão com metade da largura e altura da tela | ||
default_size="${half_width}x${half_height}" | ||
fi | ||
fi | ||
|
||
# Save dynamic screenshot resolution | ||
echo "$half_height" >"${TMP_FOLDER}/screenshot-resolution.txt" | ||
|
||
COMMON_OPTIONS="QT_QPA_PLATFORM=xcb SDL_VIDEODRIVER=x11 WINIT_UNIX_BACKEND=x11 GDK_BACKEND=x11 bigbashview -n \"$TITLE\" -s ${half_width}x${half_height}" | ||
_session="$(sh_get_desktop_session)" | ||
case "${_session^^}" in | ||
X11) | ||
COMMON_OPTIONS="QT_QPA_PLATFORM=xcb SDL_VIDEODRIVER=x11 WINIT_UNIX_BACKEND=x11 GDK_BACKEND=x11 bigbashview -n \"$TITLE\" -s ${default_size}" | ||
;; | ||
WAYLAND) | ||
COMMON_OPTIONS="MOZ_ENABLE_WAYLAND=1 bigbashview -n \"$TITLE\" -s ${default_size}" | ||
: | ||
;; | ||
esac | ||
|
||
if [[ -n "$1" ]]; then | ||
case "$1" in | ||
"category") eval "$COMMON_OPTIONS index.sh.htm?category=\"$2\" -i $bigstore_icon_file" ;; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,9 @@ | |
# Description: Big Store installing programs for BigLinux | ||
# | ||
# Created: 2022/11/01 | ||
# Altered: 2024/05/08 | ||
# Altered: 2024/07/22 | ||
# | ||
# Copyright (c) 2023-2023, Vilmar Catafesta <[email protected]> | ||
# Copyright (c) 2023-2024, Vilmar Catafesta <[email protected]> | ||
# 2022-2023, Bruno Gonçalves <www.biglinux.com.br> | ||
# 2022-2023, Rafael Ruscher <[email protected]> | ||
# All rights reserved. | ||
|
@@ -34,16 +34,11 @@ | |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
APP="${0##*/}" | ||
_VERSION_="1.0.0-20240108" | ||
_VERSION_="1.0.0-20240722" | ||
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'} | ||
export BOOTLOG="/tmp/bigstore-$USER-$(date +"%d%m%Y").log" | ||
export LOGGER='/dev/tty8' | ||
export TMP_FOLDER="/tmp/bigstore-$USER" | ||
export HOME_FOLDER="$HOME/.bigstore" | ||
export INI_FILE_BIG_STORE="$HOME_FOLDER/big-store.ini" | ||
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh" | ||
[[ -f "${LIBRARY}/bstrlib.sh" ]] && source "${LIBRARY}/bstrlib.sh" | ||
[[ -f "${LIBRARY}/tinilib.sh" ]] && source "${LIBRARY}/tinilib.sh" | ||
[[ -f "${LIBRARY}/bstrlib.sh" ]] && source "${LIBRARY}/bstrlib.sh" | ||
|
||
function sh_config { | ||
#Translation | ||
|
Oops, something went wrong.