Skip to content

Commit

Permalink
Merge pull request #68 from vcatafesta/main
Browse files Browse the repository at this point in the history
seg 07 ago 2023 04:37:48 -04 Vilmar Catafesta (vcatafesta@gmail.com)
  • Loading branch information
bigbruno authored Aug 8, 2023
2 parents 67d4b8d + 81a0cf1 commit 4fb8f3e
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 78 deletions.
11 changes: 6 additions & 5 deletions bigcontrolcenter/usr/bin/big-welcome
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Control Center to help usage of BigLinux
#
# Created: 2022/02/28
# Altered: 2023/08/05
# Altered: 2023/08/07
#
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com>
# 2022-2023, Bruno Gonçalves <www.biglinux.com.br>
Expand Down Expand Up @@ -34,11 +34,12 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

APP="${0##*/}"
_VERSION_="1.0.0-20230805"
BOOTLOG="/tmp/bigcontrolcenter-$(date +"%d%m%Y").log"
_VERSION_="1.0.0-20230807"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'}
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh"
export XDG_RUNTIME="${XDG_RUNTIME:-/run/user/$(id -g)}"

function sh_config {
#Translation
Expand All @@ -47,8 +48,8 @@ function sh_config {
}

function sh_main {
cmdlogger cd /usr/share/bigbashview/bcc/apps/big-welcome/ || return 1
bigbashview -s 1000x660 main.sh.htm -n $"Introdução ao BigLinux" -i big-logo.png
# cmdlogger cd /usr/share/bigbashview/bcc/apps/big-welcome/ || return 1
cmdlogger bigbashview -s 1000x660 main.sh.htm -n $"Introdução ao BigLinux" -i big-logo.png -d "/usr/share/bigbashview/bcc/apps/big-welcome"
}

#sh_debug
Expand Down
9 changes: 5 additions & 4 deletions bigcontrolcenter/usr/bin/bigcontrolcenter
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# /usr/bin/bigcontrolcenter
# Created: 0000/00/00
# Altered: 2023/08/05
# Altered: 2023/08/08
#
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com>
# 0000-2023, bigbruno Bruno Gonçalves <bruno@biglinux.com.br>
Expand All @@ -31,11 +31,12 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

APP="${0##*/}"
_VERSION_="1.0.0-20230805"
_VERSION_="1.0.0-20230808"
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'}
BOOTLOG="/tmp/bigcontrolcenter-$(date +"%d%m%Y").log"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh"
export XDG_RUNTIME="${XDG_RUNTIME:-/run/user/$(id -g)}"

function sh_config {
#Translation
Expand Down Expand Up @@ -160,7 +161,7 @@ function sh_main {
SDL_VIDEODRIVER=x11\
WINIT_UNIX_BACKEND=x11\
GDK_BACKEND=x11\
bash bigbashview -n "$TITLE" -s 1200x645 "$cfilestart" -i icon.png
cmdlogger bash bigbashview -n "$TITLE" -s 1280x768 "$cfilestart" -i icon.png
}

#sh_debug
Expand Down
6 changes: 3 additions & 3 deletions bigcontrolcenter/usr/bin/bigcontrolcenter-clean-menu
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# /usr/bin/bigcontrolcenter-clean-menu
# Created: 0000/00/00
# Altered: 2023/08/05
# Altered: 2023/08/07
#
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com>
# 0000-2023, bigbruno Bruno Gonçalves <bruno@biglinux.com.br>
Expand Down Expand Up @@ -32,8 +32,8 @@


APP="${0##*/}"
_VERSION_="1.0.0-20230805"
BOOTLOG="/tmp/bigcontrolcenter-$(date +"%d%m%Y").log"
_VERSION_="1.0.0-20230807"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'}
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh"
Expand Down
6 changes: 3 additions & 3 deletions bigcontrolcenter/usr/bin/bigcontrolcenter-restore-menu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# usr/bin/bigcontrolcenter-restore-menu
# Created: 0000/00/00
# Altered: 2023/08/05
# Altered: 2023/08/07
#
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com>
# 0000-2023, bigbruno Bruno Gonçalves <bruno@biglinux.com.br>
Expand All @@ -29,8 +29,8 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

APP="${0##*/}"
_VERSION_="1.0.0-20230805"
BOOTLOG="/tmp/bigcontrolcenter-$(date +"%d%m%Y").log"
_VERSION_="1.0.0-20230807"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'}
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh"
Expand Down
10 changes: 5 additions & 5 deletions bigcontrolcenter/usr/bin/bigcontrolcenter-session
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Control Center to help usage of BigLinux
#
# Created: 2022/02/28
# Altered: 2023/08/05
# Altered: 2023/08/07
#
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com>
# 2022-2023, Bruno Gonçalves <www.biglinux.com.br>
Expand Down Expand Up @@ -34,8 +34,8 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

APP="${0##*/}"
_VERSION_="1.0.0-20230805"
BOOTLOG="/tmp/bigcontrolcenter-$(date +"%d%m%Y").log"
_VERSION_="1.0.0-20230807"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'}
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh"
Expand All @@ -44,8 +44,8 @@ function sh_main {
cmdlogger sed -i '/BorderlessMaximizedWindows=true/d' ~/.config/kwinrc
/usr/lib/polkit-kde-authentication-agent-1 &
kwin_x11 &
cmdlogger cd /usr/share/bigbashview/bcc/apps/bigcontrolcenter/ || return 1
bigbashview -c black -t qt -w maximized -i icon.png index.sh.htm
# cmdlogger cd /usr/share/bigbashview/bcc/apps/bigcontrolcenter/ || return 1
cmdlogger bigbashview -c black -t qt -w maximized -i icon.png index.sh.htm -d "/usr/share/bigbashview/bcc/apps/bigcontrolcenter"
}

#sh_debub
Expand Down
51 changes: 18 additions & 33 deletions bigcontrolcenter/usr/bin/guvcview-verify-busy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# usr/bin/guvcview-verify-busy
# Created: 0000/00/00
# Altered: 2023/08/05
# Altered: 2023/08/07
#
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com>
# 0000-2023, bigbruno Bruno Gonçalves <bruno@biglinux.com.br>
Expand All @@ -29,8 +29,8 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

APP="${0##*/}"
_VERSION_="1.0.0-20230805"
BOOTLOG="/tmp/bigcontrolcenter-$(date +"%d%m%Y").log"
_VERSION_="1.0.0-20230807"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'}
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh"
Expand All @@ -39,47 +39,32 @@ function sh_config {
#Translation
export TEXTDOMAINDIR="/usr/share/locale"
export TEXTDOMAIN=bigcontrolcenter
declare -a DEPENDENCIES=(lsof kdialog guvcview)
declare -g video_device='/dev/video0'
declare -gA Amsg=(
[title]=$(gettext $"Webcam")
[error]=$(gettext $"Nenhuma webcam localizada.")
[busy]=$(gettext $"A webcam já está sendo utilizada pelo programa: ")
[msg1]=$(gettext $"Abrirei em modo de configuração. ")
[msg2]=$(gettext $"As alterações feitas podem ser vistas")
[msg3]=$(gettext $"na imagem da sua webcam em outros programas.")
)
}

function sh_checkDependencies {
local d
local errorFound=0
declare -a missing

for d in "${DEPENDENCIES[@]}"; do
[[ -z $(command -v "$d") ]] && missing+=("$d") && errorFound=1 && printf '%s\n' "${red}ERROR${reset}: Command not found ${cyan}'$d'${reset}"
done
if (( errorFound )); then
echo "${yellow}--------------IMPOSSÍVEL CONTINUAR-------------${reset}"
echo "Esse script precisa dos comandos listados acima" >&2
echo "Instale-os e/ou verifique se estão no seu \$PATH" >&2
echo "${yellow}-----------------------------------------------${reset}"
exit 1
fi
}

function sh_init {
if ! test -c "$video_device"; then
kdialog --title $"Webcam" --error $"Nenhuma webcam localizada."
function sh_main {
if ! cmdlogger test -c "$video_device"; then
cmdlogger kdialog --title "${Amsg[title]}" --error "${Amsg[error]}"
return
fi

WEBCAM_BUSY=$(lsof "$video_device" 2>/dev/null | awk 'NR==2 {print $1}')
if [[ -z "$WEBCAM_BUSY" ]]; then
guvcview >/dev/null 2>&-
cmdlogger guvcview
else
kdialog --msgbox $"A webcam já está sendo utilizada pelo programa: $WEBCAM_BUSY
Abrirei em modo de configuração.
As alterações feitas podem ser vistas
na imagem da sua webcam em outros programas." --title $"Webcam"
guvcview -z >/dev/null 2>&-
cmdlogger kdialog --msgbox "${Amsg[busy]} $WEBCAM_BUSY\n\n${Amsg[msg1]}\n${Amsg[msg2]}\n${Amsg[msg3]}\n" --title "${Amsg[error]}"
cmdlogger guvcview -z
fi
}

#sh_debug
sh_config
sh_checkDependencies
sh_init
sh_main
6 changes: 3 additions & 3 deletions bigcontrolcenter/usr/bin/hardinfo-relatory
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# usr/bin/hardinfo-relatory
# Created: 0000/00/00
# Altered: 2023/08/05
# Altered: 2023/08/07
#
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com>
# 0000-2023, bigbruno Bruno Gonçalves <bruno@biglinux.com.br>
Expand Down Expand Up @@ -32,8 +32,8 @@


APP="${0##*/}"
_VERSION_="1.0.0-20230805"
BOOTLOG="/tmp/bigcontrolcenter-$(date +"%d%m%Y").log"
_VERSION_="1.0.0-20230807"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'}
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh"
Expand Down
6 changes: 3 additions & 3 deletions bigcontrolcenter/usr/bin/waydroid-gui-big
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Control Center to help usage of BigLinux
#
# Created: 2022/02/28
# Altered: 2023/08/05
# Altered: 2023/08/07
#
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com>
# 2022-2023, Bruno Gonçalves <www.biglinux.com.br>
Expand Down Expand Up @@ -34,8 +34,8 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

APP="${0##*/}"
_VERSION_="1.0.0-20230805"
BOOTLOG="/tmp/bigcontrolcenter-$(date +"%d%m%Y").log"
_VERSION_="1.0.0-20230807"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'}
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# usr/share/bigbashview/bcc/apps/bigcontrolcenter/index.sh.htm
# Description: Control Center to help usage of BigLinux
# Created: 2022/02/28
# Altered: 2023/07/27
# Altered: 2023/08/08
#
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com>
# 2022-2023, Bruno Gonçalves <www.biglinux.com.br>
Expand Down Expand Up @@ -33,9 +33,9 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

APP="${0##*/}"
_VERSION_="1.0.0-20230727"
_VERSION_="1.0.0-20230808"
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'}
BOOTLOG="/tmp/bigcontrolcenter-$(date +"%d%m%Y").log"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'
[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh"

Expand Down Expand Up @@ -401,7 +401,7 @@ <h3 class="img-content">

# INTERNET CONNECTION OPEN
##########################
if cmdlogger test -d '/usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement'; then
if test -d '/usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement'; then
EXEC="plasmawindowed org.kde.plasma.networkmanagement"
NAME=$"Conectar à internet"
COMMENT=$"Conecte na internet por cabo de rede ou wifi."
Expand Down Expand Up @@ -460,7 +460,7 @@ <h3 class="img-content">
CATEGORY="About"
SHOW_ICON "$CATEGORY" "$COMMENT" "$EXEC" "$ICON" "$NAME"

if cmdlogger test -e '/usr/bin/manjaro-settings-manager'; then
if test -e '/usr/bin/manjaro-settings-manager'; then
EXEC="manjaro-settings-manager -m msm_users"
NAME=$"Adicionar ou Remover Usuários"
COMMENT=$"Criar, remover e gerenciar contas e grupos de usuários."
Expand All @@ -469,8 +469,9 @@ <h3 class="img-content">
SHOW_ICON "$CATEGORY" "$COMMENT" "$EXEC" "$ICON" "$NAME"
fi

if cmdlogger test -e "$HOME/.config/bigcontrolcenter/refresh"; then
if cmdlogger [[ -e '/usr/lib/qt/plugins/kcm_powerdevilprofilesconfig.so' ]]; then
if test -e "$HOME/.config/bigcontrolcenter/refresh"; then
cmdlogger rm -f "$HOME/.config/bigcontrolcenter/cache.html"
if [[ -e '/usr/lib/qt/plugins/kcm_powerdevilprofilesconfig.so' ]]; then
EXEC="kcmshell5 powerdevilprofilesconfig powerdevilglobalconfig powerdevilactivitiesconfig kcm_energyinfo"
NAME=$"Economia de energia"
COMMENT=""
Expand Down Expand Up @@ -535,7 +536,7 @@ <h3 class="img-content">
########################################
# big-driver-manager
########################################
if cmdlogger test -e '/usr/bin/big-driver-manager'; then
if test -e '/usr/bin/big-driver-manager'; then
EXEC="big-driver-manager"
NAME=$"Instalar drivers e firmwares"
COMMENT=""
Expand All @@ -547,7 +548,7 @@ <h3 class="img-content">
########################################
# Timeshift
########################################
if cmdlogger test -e '/usr/bin/timeshift-launcher'; then
if test -e '/usr/bin/timeshift-launcher'; then
EXEC="timeshift-launcher"
NAME=$"Snapshots e backups"

Expand All @@ -557,7 +558,7 @@ <h3 class="img-content">
COMMENT=$"A partição que o sistema foi instalado não possui pontos de restauração, mas é possível fazer backups utilizando o método rsync."
fi

if cmdlogger test -e '/run/miso/bootmnt'; then
if test -e '/run/miso/bootmnt'; then
COMMENT=$"Sistema em modo live. Restaure pontos de restauração do sistema instalado."
fi

Expand All @@ -569,7 +570,7 @@ <h3 class="img-content">
########################################
# tts-biglinux
########################################
if cmdlogger test -e '/usr/bin/tts-config'; then
if test -e '/usr/bin/tts-config'; then
EXEC="tts-config"
NAME=$"Configurar a voz do sistema (TTS)"
COMMENT=$"Selecione o texto desejado e utilize o atalho com a tecla [Meta] + V ou o ícone no menu do sistema para que textos escritos sejam falados."
Expand All @@ -581,7 +582,7 @@ <h3 class="img-content">
########################################
# kernel
########################################
if cmdlogger test -e '/usr/share/kservices5/msm_kernel.desktop'; then
if test -e '/usr/share/kservices5/msm_kernel.desktop'; then
EXEC="big-kernel-manager"
NAME=$"Instalar versões de kernel e mesa"
COMMENT=""
Expand All @@ -590,7 +591,7 @@ <h3 class="img-content">
CACHE_ICON "$CATEGORY" "$COMMENT" "$EXEC" "$ICON" "$NAME"
fi

if cmdlogger test -e '/usr/bin/policytool'; then
if test -e '/usr/bin/policytool'; then
EXEC="policytool"
NAME=$"Regras de segurança do Java"
COMMENT=$"OpenJDK Java 8 Policy Tool"
Expand All @@ -607,9 +608,9 @@ <h3 class="img-content">
# Wait loop-search.sh end
wait

cat "$HOME/.config/bigcontrolcenter/cache.html"
cat ~/.config/bigcontrolcenter/cache.html
cat ~/.config/bigcontrolcenter/cache-*.html
cat ~/.config/bigcontrolcenter/custom-*.html #custom files user
cat ~/.config/bigcontrolcenter/custom-*.html #custom files user

#WEBAPP
EXEC="xdg-open https://snapdrop.net"
Expand All @@ -635,7 +636,7 @@ <h3 class="img-content">
</div>
EOF

if cmdlogger test -e "$HOME/.config/bigcontrolcenter/show_other"; then
if test -e "$HOME/.config/bigcontrolcenter/show_other"; then
echo '<style>#Other{display: flex !important;}</style>'
fi

Expand Down
Loading

0 comments on commit 4fb8f3e

Please sign in to comment.